• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JavaFX 2.0 - Input Window (display driver crash)

 
Alex Sinclair
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5148
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Alex Sinclair
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3159
33
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Alex Sinclair
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I had a similar issue, updating the video card driver solved the problem
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic