• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Problem with java.lang.IllegalStateException: Cannot set modality once stage has been set visible

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello guys , im having an issue : when i click a menuItem it shows a window who says that "are you sure you want to logout" , and i click no (so that window is closed), but when i click again i that menuItem it shows me java.lang.IllegalStateException: Cannot set modality once stage has been set visible.

What should I do ?

Here's the code:

MainWindowController.java



Here's the method to close that window if user click "NO" i dont want to logout


OUTPUT:


MainWindowController.java.43 line is this one:
 
Ertan Hasani
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All i needed to do was to split setup(initialize) and control (logoutWindow) :

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic