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

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -