public void paint(Graphics g, JComponent comp) { // paint to the buffered image comp.setForeground(UIHelper.DARK_GREEN_COLOR); comp.setBackground(UIHelper.BG_COLOR); comp.setFont(UIHelper.VER_12_BOLD); super.paint(g, comp); // do an alpha composite }
/** * Paints the given component. * * @param g The graphics context to use. * @param c The component to paint. */ public void paint(Graphics g, JComponent c) { super.paint(g, c); // Container parent = menuItem.getParent(); // Paint the horizontal highlight gradient: // MetouiaGradients.drawHighlight( // g, new Rectangle(0, -1, parent.getWidth(), parent.getHeight() / 2), // true, true); // Paint the horizontal shadow gradient: // MetouiaGradients.drawShadow( // g, // new Rectangle( // 0, parent.getHeight() / 2 - 1, // parent.getWidth(), parent.getHeight() / 2), // true, false); }