This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes problems in refreshing a Frame window after any event Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "problems in refreshing a Frame window after any event" Watch "problems in refreshing a Frame window after any event" New topic
Author

problems in refreshing a Frame window after any event

Manoj Syoran
Greenhorn

Joined: Nov 04, 2011
Posts: 7
Sir I am finding problems in refreshing a Frame window after any event.
I have to minimize or maximize the frame to refresh and get new components visible.
Please, Help me get rid of the problem.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
any time a container is visible, when components are added/removed/whatever'ed, you need to call
[container].validate(); (AWT), or
[container].revalidate(); (Swing)

and, in most cases, followed by
[container].repaint();
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 20077
    
  30

Please UseAMeaningfulSubjectLine. In an entire forum about Swing, AWT, SWT and JFace, "AWT" is nowhere near meaningful. I've changed it for you this time.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Manoj Syoran
Greenhorn

Joined: Nov 04, 2011
Posts: 7
Sorry sir for Subject code.I will take care next time.
Sir I don't find validate function useful in rereshing the frame window.
Still I have to maximize the frame to get any change in components.
Any new component such as a Label get displayed after maximizing the frame window.
The label do not get displayed after any event such as clicking a button.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
you'll need to post a sample program that demonstrates the problem.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: problems in refreshing a Frame window after any event
 
It's not a secret anymore!