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

Popular posts from this blog

javascript - THREE.js reposition vertices for RingGeometry -

javascript - I need to update the text of a paragraph by inline edit -

assembly - What is the addressing mode for ld, add, and rjmp instructions? -