Results 1 to 3 of 3
- 05-12-2011, 02:16 PM #1Member
- Join Date
- Nov 2010
- Rep Power
- 05-12-2011, 02:36 PM #2
Use an if statement in your paintComponent() method. Only paint the image when whatever condition is true. Set that condition to false when you want to stop drawing the image.
The easiest: display the images as an ImageIcon in a JLabel that is held by the JPanel and then to remove change the icon to null.
- By Aldane in forum AWT / SwingReplies: 2Last Post: 03-28-2011, 07:28 PM
- By smitharavi in forum AWT / SwingReplies: 0Last Post: 12-16-2010, 05:14 PM
- By usha in forum AWT / SwingReplies: 1Last Post: 12-04-2010, 03:07 PM
- By Thebigchalupa in forum New To JavaReplies: 5Last Post: 04-23-2009, 07:15 PM
- By SaYuNaRa in forum New To JavaReplies: 3Last Post: 04-17-2008, 04:22 AM