Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 185
  • Last Modified:

Splash window is obscured by the application mainframe

Hello,
I am working on an application that takes a long time to load.
So I kind of need the splash window I made.

Well, it only makes sense to launce the splash window (based on JWindow) as soon as
    possible, that is directly after starting in main().
Some seconds later the main frame (based on JFrame) becomes visible and obsures the splash
that must remain visible until the application is fully operational; that is about 15" later (it's very large).
Even things like   Splash.toFront();   don't work.
Only minimising the main frame reveals that the splash is still sitting there.
What can I do?
One workaround is to display the splash (also) somewhere in a JPanel but that's a bit stupid.

;JOOP!
0
sciuriware
Asked:
sciuriware
1 Solution
 
Tommy BraasCommented:
Either defer the showing of the frame, or use JDialog instead of JWindow and make sure it is modal. Another option is to create the main frame of the application empty, not showing it and setting that frame as the parent of your JWindow.
0
 
Mayank SAssociate Director - Product EngineeringCommented:
Ideally, the JFrame.show () should happen only after the splash.dispose (). Why are you displaying the JFrame when the application has not yet become fully operational?
0
 
sciuriwareAuthor Commented:
1) a modal JDialog derivate blocks the screen.
2) the main frame is essential: there is lots of displaying going on when initialising.
     The user needs the info!
3) I found a solution myself:
     I 'launch' the splash Window 2ce:
    a) as soon as possible in main( )
    b) the JFrame.show( ) is followed by a relaunch of a 2nd one and a disposal of the 1st splash, in that order.
After some experimenting I found a sequence that doesn't show gaps (as far as the user can see).
Because the 2 splashes look the same it's just 2 times the same display.
In real life the 1st splash is obscured by the main frame and goes away without notice.

Sorry I was hoping for a surprising idea by someone.
I found a lot of topic around EE and in JAVAWORLD, but none to make things easier.

I will request for a refund this time.
Thanks for your time.
;JOOP!
0
 
Tommy BraasCommented:
>>  1) a modal JDialog derivate blocks the screen.
It will unless you launch it from a seperate thread

>> 2) the main frame is essential: there is lots of displaying going on when initialising.
>>     The user needs the info!
Wasn't obvious from the question! ;-)

Good luck!
0
 
PashaModCommented:
Closed, 40 points refunded.
PashaMod
Community Support Moderator
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now