• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JavaFX 2.0 - Input Window (display driver crash)

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I had a similar issue, updating the video card driver solved the problem
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic