This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Swing / AWT / SWT and the fly likes pop-up frames display for a few seconds when i run my programs outside the IDE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "pop-up frames display for a few seconds when i run my programs outside the IDE" Watch "pop-up frames display for a few seconds when i run my programs outside the IDE" New topic
Author

pop-up frames display for a few seconds when i run my programs outside the IDE

Arhyal gyel
Greenhorn

Joined: Feb 03, 2012
Posts: 5
Hello ranchers!!!
I really need your help on this. When i ever i write a program and run it outside the IDE (i use netbeans 6.9.1), the program runs perfectly, but when i install JDK 6 or 7 on a pc that did not previously have java and run my program, the pop-up frames such as JFileChooser or JOptionPane only show for a couple of seconds (approximately 7 to 9 seconds) then they close themselves and choose the default option without any user input.
I need y'all to help me out or give me suggestions on what to do or what i'm doing wrongly.
NB: I use 'javaw.exe' under the '/bin' directory of the JRE to execute the program since the 'java.exe' only brings out a console for2 seconds then does nothing.
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4530
    
    5

To get better help sooner, post a SSCCE (Short, Self Contained, Compilable and Executable) example that demonstrates the errant behavior on the other machine.

Note that the first 'S' stands for Short. We don't want to see all your code.


luck, db
There are no new questions, but there may be new answers.
Arhyal gyel
Greenhorn

Joined: Feb 03, 2012
Posts: 5
Basically any code that pops-up a JOptionPane or a JFileChooser will only run for a couple of seconds instead of waiting for user input(that is when i run my program outside the IDE on a separate machine).
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
Basically you're the only person with that problem.

You would need to prove how it happens
by posting a short sample program we can
run and see it happening.
Arhyal gyel
Greenhorn

Joined: Feb 03, 2012
Posts: 5
Ok, here is a sample code that when built(by the NetBeans IDE) and run outside the IDE on another system (on which i've already installed JDK 7), will only show the JOptionPane for roughly 7 to 9 seconds then disappear without waiting for user input.


This code works correctly in the IDE, and when i build it and run it outside the IDE, but when i try to run it on another system (outside the IDE), the pop-up keeps disappearing after a few seconds without user input.
I.ve tried it on more than one system.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> Ok, here is a sample code that when built(by the NetBeans IDE)

rubbish

> This code works correctly in the IDE,

more rubbish


so, where's the 'n'

all you've done is typed some guesswork here.

stop wasting everyone's time.
 
wood burning stoves
 
subject: pop-up frames display for a few seconds when i run my programs outside the IDE