Java tutorial
//package com.java2s; import java.awt.Component; import java.awt.Dialog; import javax.swing.SwingUtilities; public class Main { public static Dialog getDialog(Component c) { return (Dialog) SwingUtilities.windowForComponent(c); } }