swing - Java Open GUI and wait until its closed -
i'm trying open gui , wait until jframe closed. heard jdialog don't know how use actual code:
gui gui = new gui(); gui.show(); // creates jbuttons, jlabels, , show jframe.
now wait until jframe closed, don't know how continue.
can me please?
you can this:
- inherit
jdialog
instead ofjframe
. - call
setmodalitytype(modalitytype.application_modal)
make dialog modal. - if use
jframe(layoutmanager)
constructor, have callsetlayout()
setlayoutmanager
instead. - when done dialog, call
setvisible(false)
ordispose
continue program.
ps: next time should post working code exposes problem.
Comments
Post a Comment