This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JavaFX and the fly likes JavaFX 2.0 - Input Window (display driver crash) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JavaFX
Bookmark "JavaFX 2.0 - Input Window (display driver crash)" Watch "JavaFX 2.0 - Input Window (display driver crash)" New topic
Author

JavaFX 2.0 - Input Window (display driver crash)

Alex Sinclair
Greenhorn

Joined: Feb 07, 2012
Posts: 7
I've always been a fan of Swing, but I decided recently to try out JavaFX now that I don't have to learn a new scripting language. I'm still looking for a good JavaFX 2.0 resource, so I'm sort of winging everything here, and I've run into an odd problem.

I'm trying to display a new window with some input controls when the user presses a button. The only way to display a window (other than undecoroated popup windows) that my Google-fu has produced is by using a Stage, so inside of the handle() method I create a new Stage and show it. When it's empty, everything is fine. However, if I add a Scene to the Stage (so I can add the controls), when I press the button my display driver crashes. When it recovers the new window is there, but if I try to tab to it then it crashes again.





Any solution would be great, either fixing the cause of the crash, or a better way to implement a new window that hopefully doesn't crash.
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4523
    
    5

By 'display driver' do you mean graphics driver? Whether yes or no, try updating the driver in question -- it may be buggy, and there may be an update with a fix.

... or a better way to implement a new window that hopefully doesn't crash.

Do the samples in the tutorial run without a hitch?
http://docs.oracle.com/javafx/2.0/get_started/jfxpub-get_started.htm


luck, db
There are no new questions, but there may be new answers.
Alex Sinclair
Greenhorn

Joined: Feb 07, 2012
Posts: 7
Yeah, those samples are fine, and yes it's my graphics driver. I can run a single Stage with a single Scene, it's when I try to show a second Scene that the driver goes unresponsive. I'll try updating it.
Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3064
    
  33

Did you try using the same stage but changing the scene. There would be a Stage instance passed in the start method of the class which extends Application, so try passing the same Stage and use it to set the Scene accordingly.


Mohamed Sanaulla | My Blog
Alex Sinclair
Greenhorn

Joined: Feb 07, 2012
Posts: 7
Using the same stage only changes the contents of the same window, although that is very good to know for future reference.

Updating my driver worked. Looking back that probably have been my first step. I'm used to upgrading my driver for games, not Java >.>

Thanks.
M Marcel
Greenhorn

Joined: Feb 24, 2012
Posts: 1
Hi, I had a similar issue, updating the video card driver solved the problem
 
Don't get me started about those stupid light bulbs.
 
subject: JavaFX 2.0 - Input Window (display driver crash)
 
Similar Threads
Need HELP Temperature Conversion
get a textfield value from a frame to an applet
How to embed JavaFX 2.0 application with jsp (to deploy it on server)
Insider's Guide to Mixing Swing and JavaFX
Applet Code Error