protected void paint(Graphics g) { g.setFont(fontSetting.getFont()); boolean focus = g.isDrawingStyleSet(Graphics.DRAWSTYLE_FOCUS); int textColor = Color.BLACK; if (focus) { g.setColor(Color.GREEN); g.fillRect(0, 0, 5, getHeight()); } if (locked) { textColor = Color.GRAY; g.drawBitmap( getWidth() - 5 - lock.getWidth(), (getHeight() - lock.getHeight()) / 2, lock.getWidth(), lock.getHeight(), lock, 0, 0); } else { if (focus) { g.drawBitmap( getWidth() - 5 - focusArrow.getWidth(), (getHeight() - focusArrow.getHeight()) / 2, focusArrow.getWidth(), focusArrow.getHeight(), focusArrow, 0, 0); } else { g.drawBitmap( getWidth() - 5 - normalArrow.getWidth(), (getHeight() - normalArrow.getHeight()) / 2, normalArrow.getWidth(), normalArrow.getHeight(), normalArrow, 0, 0); } } g.drawBitmap( 25, (getHeight() - image.getHeight()) / 2, image.getWidth(), image.getHeight(), image, 0, 0); g.setColor(textColor); g.drawText(title, 5 + 20 + image.getWidth() + 20, (getHeight() - g.getFont().getHeight()) / 2); }