Java Utililty Methods JDialog Show

List of utility methods to do JDialog Show

Description

The list of methods to do JDialog Show are organized into topic(s).

Method

booleanisShowing(JDialog f)
Is the dialog showing
if (f == null) {
    return false;
return f.isShowing();
voidshow(JDialog dlg)
Shows a modal dialog.
dlg.setModal(true);
dlg.setVisible(true);
voidshowDialog(JDialog d)
show Dialog
final Toolkit toolkit = Toolkit.getDefaultToolkit();
final Dimension screenSize = toolkit.getScreenSize();
final int x = (screenSize.width - d.getWidth()) / 2;
final int y = (screenSize.height - d.getHeight()) / 2;
d.setLocation(x, y);
d.setVisible(true);
voidshowDialog(JDialog dlg, Component parent)
show Dialog
showDialog(dlg, parent, true);
voidshowErrorMessage(JDialog dialog, String msg)
show Error Message
JOptionPane.showMessageDialog(dialog, msg, "JavaSnoop", JOptionPane.ERROR_MESSAGE);