Solved

Splash window is obscured by the application mainframe

Posted on 2004-03-25
6
174 Views
Last Modified: 2010-03-31
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
Comment
Question by:sciuriware
6 Comments
 
LVL 14

Expert Comment

by:Tommy Braas
Comment Utility
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
 
LVL 30

Expert Comment

by:mayankeagle
Comment Utility
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
 
LVL 24

Author Comment

by:sciuriware
Comment Utility
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
 
LVL 14

Expert Comment

by:Tommy Braas
Comment Utility
>>  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
 

Accepted Solution

by:
PashaMod earned 0 total points
Comment Utility
Closed, 40 points refunded.
PashaMod
Community Support Moderator
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now