java - Find all modal dialogs belonging to a frame -
java - Find all modal dialogs belonging to a frame -
i need able tell if there modal dialogs open in application. there way this?
solution alright, based on accepted answer, came accomplish needed:
window[] wins : mymainframe.getownedwindows(); for(window w : wins) { if(w instanceof jdialog) { jdialog jd = (jdialog)w; if(jd.ismodal() && jd.isvisible()) { // out of current operation (return null in case) homecoming null; } }
perhaps calling window's getownedwindows() you're looking for, , class derive window have method, including jframe , jdialog.
but agree more context help!
java swing awt
Comments
Post a Comment