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

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

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -