The Source for Java Technology Collaboration

Home » java.net Forums » Java Desktop Technologies » Swing & AWT

Thread: help in assigning progressbar to my project

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 5 - Last Post: Aug 17, 2007 8:10 AM by: swv
pokuri

Posts: 10
help in assigning progressbar to my project
Posted: Aug 9, 2007 6:23 AM
  Click to reply to this thread Reply

hi friends i need ur help here

i have developed a stanalone application which takes 3 to 4 sec to display total GUI. but in the mean time i want to display a deteminate progressbar. How can i do it. if i can, plz give me some code hints too

tarbo

Posts: 425
Re: help in assigning progressbar to my project
Posted: Aug 9, 2007 7:05 AM   in response to: pokuri
  Click to reply to this thread Reply

You may find java.awt.SplashScreen helpful.

pokuri

Posts: 10
Re: help in assigning progressbar to my project
Posted: Aug 10, 2007 2:32 AM   in response to: tarbo
  Click to reply to this thread Reply

but i am using java 1.5

tarbo

Posts: 425
Re: help in assigning progressbar to my project
Posted: Aug 10, 2007 3:02 AM   in response to: pokuri
  Click to reply to this thread Reply

Then you can either upgrade to 6 or you can make do with a class of your own: spawn an undecorated frame with an image as content, and draw as necessary. Append a splash.setVisible(false) to the EDT after telling the GUI to load and you should have a splash screen.

It's what people did before SplashScreen became available as a class.

dhirwinjr

Posts: 60
Re: help in assigning progressbar to my project
Posted: Aug 10, 2007 12:16 PM   in response to: tarbo
  Click to reply to this thread Reply

You could check out the Netbeans source. If you use Netbeans you'll notice the splashscreen with a custom progress bar. I once used this as a basis for a project pre-1.6.

Dave

swv

Posts: 242
Re: help in assigning progressbar to my project
Posted: Aug 17, 2007 8:10 AM   in response to: pokuri
  Click to reply to this thread Reply

This is a basic question- something everyone wants to do sooner or later. If you have a question you thinks that description, look at the Swing Tutorial on sun's site. I know in this case they address this.




 XML java.net RSS