List of usage examples for javax.swing SwingUtilities paintComponent
public static void paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h)
Graphics
. From source file:Main.java
@Override public void paint(Graphics g, JComponent c) { super.paint(g, c); Dimension d = l.getPreferredSize(); int x = c.getWidth() - d.width - 5; SwingUtilities.paintComponent(g, l, rubberStamp, x, 2, d.width, d.height); }