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
jdialoginstead ofjframe. - call
setmodalitytype(modalitytype.application_modal)make dialog modal. - if use
jframe(layoutmanager)constructor, have callsetlayout()setlayoutmanagerinstead. - when done dialog, call
setvisible(false)ordisposecontinue program.
ps: next time should post working code exposes problem.
Comments
Post a Comment