I\'m trying to develop some sort of paint using Java.
I have a JComponent that is located inside of a JPanel.
I already can draw lines and rectangles into th
First of all, print() is the incorrect method. What I guess should work (haven't tested it yet) is: get the BufferedImage's Graphics (b.createGraphics()) and use that graphics object to paint() your panel/component.
print()
BufferedImage
b.createGraphics()
paint()
(e.g. yourPanel.paint(b.createGraphics());)
yourPanel.paint(b.createGraphics());