Java tutorial
//package com.java2s; //License from project: Open Source License import java.awt.Window; import javax.swing.JDialog; public class Main { public static JDialog getVisibleDialog(Window owner, String title) { for (Window w : Window.getWindows()) if (w instanceof JDialog && w.isShowing() && ((JDialog) w).getOwner() == owner && ((JDialog) w).getTitle().equals(title)) return (JDialog) w; return null; } }