Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void drawIt(Graphics graphics)
- {
- Dimension size = label.getPreferredSize();
- BufferedImage image = new BufferedImage(size.width, size.height, BufferedImage.TYPE_INT_ARGB);
- Graphics imageGraphics = image.createGraphics();
- label.paint(imageGraphics);
- graphics.drawImage(image, 100, 100, null);
- imageGraphics.dispose();
- }
- label.paint(graphics);
- label.paint(graphics);
- graphics.translate(100, 100);
- label.paint(graphics);
- graphics.translate(-100, -100); //set origin back to 0, 0 for following calls
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement