File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes repaint problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "repaint problem" Watch "repaint problem" New topic
Author

repaint problem

sharingan reddy
Greenhorn

Joined: Feb 14, 2010
Posts: 8
i want to add a panel taking radio button selected the panels are adding but the previous panel is not erasing even on repaint() on the parent panel.
how to resolve thatjavascript:emoticon('');
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10535
    
    9

After you add/remove the panel, invoke revalidate() and repaint() on the parent panel


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
pete stein
Bartender

Joined: Feb 23, 2007
Posts: 1561
I also wonder if a CardLayout would work for you. Are you swapping JPanels? If so, you may want to look into this.

Best of luck!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: repaint problem