@Override
    protected void paintComponent(Graphics g) {
        Graphics2D g2d = (Graphics2D) g.create();
        
        g2d.setColor(backgroundColor);
        g2d.fillRect(0, 0, this.getBounds().width + 1, this.getBounds().height + 1);
        
        g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
        g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
        g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
        g2d.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);
        g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
        
        if (readImage != null) {
            g2d.drawImage(readImage, startXDrawingPoint, startYDrawingPoint, drawingImageWidth, drawingImageHeigh, this);
        }
        
        if (firstPageReached || lastPageReached) {
            Font font = new Font(g2d.getFont().getName(), Font.BOLD, 15);
            FontRenderContext frc = new FontRenderContext(null, false, false);
            g2d.setFont(font);
            String text;
            if (firstPageReached) {
                text = java.util.ResourceBundle.getBundle("booknaviger/resources/ReadComponent").getString("firstPage.text");
            } else {
                text = java.util.ResourceBundle.getBundle("booknaviger/resources/ReadComponent").getString("lastPage.text");
            }
            int fontWidth = (int) font.getStringBounds(text, frc).getWidth();
            g2d.setColor(Color.BLACK);
            g2d.fillRect(5, 5, fontWidth + 10, 20);
            g2d.fillRect(this.getWidth() - fontWidth - 15, 5, fontWidth + 10, 20);
            g2d.fillRect(5, this.getHeight() - 25, fontWidth + 10, 20);
            g2d.fillRect(this.getWidth() - fontWidth - 15, this.getHeight() - 25, fontWidth + 10, 20);
            g2d.setColor(Color.YELLOW);
            g2d.drawString(text, 10, 20);
            g2d.drawString(text, this.getWidth() - fontWidth - 10, 20);
            g2d.drawString(text, 10, this.getHeight() - 10);
            g2d.drawString(text, this.getWidth() - fontWidth - 10, this.getHeight() - 10);
        }
        
        g2d.dispose();
    }