public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { g.translate(x, y); if (MetalLookAndFeel.usingOcean()) { // Only paint a border if we're not next to a horizontal // toolbar if (!MetalToolBarUI.doesMenuBarBorderToolBar((JMenuBar) c)) { g.setColor(MetalLookAndFeel.getControl()); g.drawLine(0, h - 2, w, h - 2); g.setColor(UIManager.getColor("MenuBar.borderColor")); g.drawLine(0, h - 1, w, h - 1); } } else { g.setColor(MetalLookAndFeel.getControlShadow()); g.drawLine(0, h - 1, w, h - 1); } g.translate(-x, -y); }
public void paint(Graphics g, JComponent c) { AntialiasingManager.activateAntialiasing(g); super.paint(g, c); }