List of utility methods to do JFrame Show
int | showSaveDialog(JFrame parent, String message) show Save Dialog Object[] saveDialogOptions = new Object[] { "Save", "Discard Changes", "Cancel" }; return JOptionPane.showOptionDialog(parent, "You have an unsaved adventure!\n" + message, "Warning", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, saveDialogOptions, saveDialogOptions[0]); |
void | showSuccess(JFrame frame) show Success JOptionPane.showMessageDialog(frame, SAVE_SUCCESS_MESSAGE, SAVE_SUCCESS_TITLE, JOptionPane.INFORMATION_MESSAGE); |
String | showTextboxDialog(javax.swing.JFrame frame, String texto, String title, String valorInicial, int type) Mostra uma caixa de menssagem para que seja ensirido um valor. Object txt = null; JDialog jDialog = new JDialog(); jDialog.setTitle(title); jDialog.setFocusableWindowState(true); if (frame != null) { frame.setExtendedState(Frame.ICONIFIED); frame.pack(); frame.setExtendedState(Frame.MAXIMIZED_BOTH); ... |