List of usage examples for java.awt Dialog Dialog
public Dialog(Window owner, String title, ModalityType modalityType)
From source file:Main.java
static Window getDialog(Component parentComponent, String title, boolean modal) { if (ALWAYS_USE_FRAME) return new Frame(title); Window dialog;//from w ww . j a va 2s .c o m Window window = getComponentWindow(parentComponent); if (window instanceof Frame) { dialog = new Dialog((Frame) window, title, modal); } else { dialog = new Dialog((Dialog) window, title, modal); } return dialog; }