aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Status display Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Status display" Watch "Status display" New topic
Author

Status display

Huang Crystal
Greenhorn

Joined: Jul 17, 2001
Posts: 20
Hi all,
I am implementing a GUI interface using swing. One of the requirements is to provide the status in the status bar.
For example, when the program is pinging all the IP addresses within the domain, the status bar should display something like "Pinging IP addresses...". Another example would be when opening a file, the status bar should display "Opening file..." etc.
Any example codes/help will be greatly appreciated.
Thanx for the help...0=)
------------------
0=),
Crystal


0=),<BR>Crystal
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Unless you are doing this in an applet, you aren't going to get text to show up in the 'status bar' of the application frame. However, you can basically do the same thing by just adding a Textfield at the bottom of the frame and sending messages to it instead of the status bar...


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Huang Crystal
Greenhorn

Joined: Jul 17, 2001
Posts: 20
Hi,
I do not quite understand. Do you mind to explain more specifically?
Thanx..
------------------
0=),
Crystal
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

OK... here's how you would normally do it in an Applet ( or JApplet, since you said you were using Swing... ). You would just call showStatus() with the string you want to display. This only works because the showStatus() method is defined in Applet to display text in the status bar.



But, if you are not using an Applet derivitive, you do not have the showStatus() method... so you have to find a workaround... I proposed just adding a JTextField at the bottom of the screen to take the place of the status bar...



HTH,
-Nate
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Status display