• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Setting Title Frame

 
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would like to set a title for my swing notepad which could open before loading of application.
Could yoiu please suggest me which class should i need to work with.
Thanks in advance.
Rashid Ali
 
Ranch Hand
Posts: 732
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what do u mean can open before loading the application?
 
Rashid Ali
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For example MS Word title screen which appear before opening up the application.
Please suggest.
Rashid Ali
 
Roy Ben Ami
Ranch Hand
Posts: 732
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i think it is just a dialog they made andopened it while the application is loading.
u can do the same.
make a dialog and open it up before u setisible(true) your application.
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All you have to do is make a graphic for your title screen, put that graphic in a JLabel (as an ImageIcon), put that label in a JWindow, and you have your splash screen. (Splash screen is usually the preferred term for the intro window that pops up before the full application... title is confusing, because each frame has a title at the top...).

In the constructor of your window, or in the main() method that is launching it, you can do the following - Construct the JWindow splash screen and make it visible. Then construct your real application and set it visible. Then set the splash screen invisible and dispose of it.

-Nate
 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here's a tip - use a normal AWT Window for your popup loading window. From my testing, the AWT Window loads a lot quicker than the Swing JWindow so your loading screen gets up faster.
I've found that when using a JWindow, the main program frame will be ready by the time your loading screen is (unless you have a large amount of initialization to do) and the purpose of the loading screen (to give some feedback to the user) is lost.
Make sure that you only use AWT components (like Labels not JLabels) on your Window though!
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic