• 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

Static variable in swing

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a static dialog box which can contain a link to the same dialog box with another id.
(The dialog box displays a form of the id passed.)
there is a close button in the dialog box to dispose it. this works fine if i have only one window.
but if there is more than one dialog box(another instance of the same static dialog) anf if i close the top most window, that windoow closes, but the close button of other windows wont work..
is it because the staic variable dialog has no more existence now???
if so can anyone pls. suggest an alternative?? we cant make the dialog box non static
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, it's because the dialog box is static... you can't have "another instance of the static dialog box" if it's static there is only one instance per JVM...

And why can't you make the dialog non-static? That is the solution to this problem, and the requirement is completely stupid...
 
pie. tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic