java - How to handle JDialog opened after setVisible(false)? -


this scenario:

  • add windowopened() handler new instance of jdialog
  • show dialog first time using jdialog.setvisible(true)
  • as expected: windowopened() handler triggered
  • jdialog.setvisible(false)
  • jdialog.setvisible(true)
  • expected, not happened: windowopened() handler triggered

how handle situation when modal dialog appeared on screen whenever first time or subsequent times called setvisible(true) ?

how handle situation when modal dialog appeared on screen whenever first time or subsequent times called setvisible(true) ?

  • have use componentlistener, , override methods componenthidden() , componentshown()

  • jcomponent must returns true isdisplayable()

  • more here


Popular posts from this blog

Php - Delimiter must not be alphanumeric or backslash -

c# - How to change the "Applies To" field under folder auditing options programatically (.NET) -

c++ - Ambiguity when using boost::assign::list_of to construct a std::vector -