Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

splash screen and the java app

 
Roldan Baldo
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i use netbeans, and use the drag and drop feature of netbeans to make applications in java. my problem is i have a splash screen, which is a separate class, and the java application(my application), how to combine those 2? I instantiate the splashscreen and call it in the constructor of my main class but it doesnt show up.

any help would be much appreciated. thanks
 
Rob Spoor
Sheriff
Pie
Posts: 20608
63
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about showing us an SSCCE that includes a very simplified version of your main app and the splash screen?
 
Roldan Baldo
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For example this is my main application class


and this is my splashscreen


the 2 screens will pop up together, instead the splash screen will be first and then the application's Frame.
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're putting the EDT to sleep and thus your whole GUI with this code:



If you are not familiar with the EDT or what I'm stating above, please read about Concurrency in Swing
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic