This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes How to know when a JFrame and its components are ready? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to know when a JFrame and its components are ready?" Watch "How to know when a JFrame and its components are ready?" New topic
Author

How to know when a JFrame and its components are ready?

Jeronimo Backes
Greenhorn

Joined: Sep 20, 2004
Posts: 29
I'm creating a browser, with the specific funcionality of search phrases in HTML files. Some files can be very large (10 mb of text - ONLY text). When I open the file, a status bar says: "Opening page: etc, etc, etc". When the reading was finished, it says: "Ready." But this happens when I OPEN the file.

The problem is:
The graphics aren't ready yet. JScrollPane's are processing, JTextPane's are processing, and that message saying: "Ready" while graphics are processing (something that can take a while: 1 or 2 minutes (or even more) to exhibit 900 pages of one single file) is ridiculous.

Is there a listener where I can be informed that the graphic processing is done? So I can enable atcions from user (and print "Ready" in the status bar) after that? And how can I optimize the file-opening and graphic processing?


The art of being crazy is to NEVER commit the crazyness of being normal.
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
You might find some food for thought in these pages of the java tutorial:
How to Use Threads
How to Use Progress Bars
 
jQuery in Action, 2nd edition
 
subject: How to know when a JFrame and its components are ready?
 
Similar Threads
cannot open office2007 documents from the java application
How to hide the URL in a childwindow (firefox)
Opening xls file in html
Eclipse Ant Integration (or, I want a big Ant Button)
Status display