Results 1 to 3 of 3
- 05-12-2011, 02:16 PM #1
Member
- Join Date
- Nov 2010
- Posts
- 54
- Rep Power
- 0
- 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.
How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
-
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.
Similar Threads
-
JPanel add/remove in a JFrame
By Aldane in forum AWT / SwingReplies: 2Last Post: 03-28-2011, 07:28 PM -
how to mark on 2 images at a time,both images are on different JPanel
By smitharavi in forum AWT / SwingReplies: 0Last Post: 12-16-2010, 05:14 PM -
how to remove images drawn by using Graphics Object
By usha in forum AWT / SwingReplies: 1Last Post: 12-04-2010, 03:07 PM -
need help with JPanel Images
By Thebigchalupa in forum New To JavaReplies: 5Last Post: 04-23-2009, 07:15 PM -
how to remove all component in container(Jpanel)
By SaYuNaRa in forum New To JavaReplies: 3Last Post: 04-17-2008, 04:22 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks