List of usage examples for javax.swing JComponent print
public void print(Graphics g)
Graphics
. From source file:com.projity.pm.graphic.network.NetworkRenderer.java
public void paintNode(Graphics2D g, GraphicNode node) { Rectangle bounds = getBounds(node); if (isEditing(node)) { editor.paintEditor(node);//from w ww. ja v a2 s . c o m } else { JComponent c = renderer.getRendererComponent(node, ((NetworkParams) graphInfo).getZoom()); if (container == null) { //c=new JLabel("test"); c.setDoubleBuffered(false); c.setOpaque(false); c.setForeground(Color.BLACK); c.setSize(bounds.width, bounds.height); g.translate(bounds.x, bounds.y); c.doLayout(); c.print(g); g.translate(-bounds.x, -bounds.y); } else rendererPane.paintComponent(g, c, container, bounds.x, bounds.y, bounds.width, bounds.height, true); } }