Z
zajekurwabiscie
Hi, my name is Janek and I have a small question about
paintComponent(Graphics g) - to draw for example LINE I should use
g.drawLine but what if I have my own Graphics created somewhere else.
More precisely I have:
BufferedImage backimage;
Graphics2D offScreen;
offScreen = backimage.createGraphics();
offScreen.drawLine(0,0,10,10);
and I would like to display it using paintComponent(Graphics g).
How can I do it ?
paintComponent(Graphics g) - to draw for example LINE I should use
g.drawLine but what if I have my own Graphics created somewhere else.
More precisely I have:
BufferedImage backimage;
Graphics2D offScreen;
offScreen = backimage.createGraphics();
offScreen.drawLine(0,0,10,10);
and I would like to display it using paintComponent(Graphics g).
How can I do it ?