public void about() { aboutBox.setSize(360, 240); aboutBox.setLocation((int)this.getLocation().getX() + 22, (int)this.getLocation().getY() + 22); aboutBox.setResizable(false); aboutBox.setVisible(true); }
public int show(JFrame frame) { dialog = new JDialog(frame, "Save Changes", true); Container contentPane = dialog.getContentPane(); contentPane.setLayout(new BorderLayout()); contentPane.add(this, BorderLayout.CENTER); dialog.setResizable(false); dialog.pack(); dialog.setLocationRelativeTo(frame); dialog.getRootPane().setDefaultButton(saveButton); dialog.setVisible(true); dialog.dispose(); return selectedValue; }
JOptionPane optionPane = new JOptionPane(mainPanel, JOptionPane.PLAIN_MESSAGE, JOptionPane.DEFAULT_OPTION, null, options, options[1]); dlg = optionPane.createDialog("Generating Deck"); dlg.setResizable(false); dlg.setVisible(true); dlg.dispose();
parentSize = Toolkit.getDefaultToolkit().getScreenSize(); dialog.setDefaultCloseOperation(JDialog.HIDE_ON_CLOSE); dialog.setResizable(false);
if (window instanceof JDialog) { final JDialog window = (JDialog) JProgressWindow.this.window; window.setResizable(true); } else { final JInternalFrame window = (JInternalFrame) JProgressWindow.this.window;
private static JDialog createDialog(JComponent parent, String title, JOptionPane optionPane) { JDialog dlg = optionPane.createDialog(parent, title); dlg.setLocationRelativeTo(parent); dlg.setResizable(true); dlg.pack(); return dlg; } }
@Override public void run() { JDialog dlg = JXErrorPane.createDialog(owner, pane); dlg.setResizable(false); dlg.setVisible(true); } };
private static JDialog createDialog(Component parent, String title, JOptionPane optionPane, final JComponent defaultFocusedComponent) { JDialog dlg = optionPane.createDialog(parent, title); dlg.setLocationRelativeTo(parent); dlg.setResizable(true); dlg.pack(); return dlg; }
public void actionPerformed( ActionEvent e ) { JOptionPane msg = new JOptionPane( "Version " + VERSION + NEW_LINE + "Authors: " + AUTHORS ); JDialog dialog = msg.createDialog( frame, "About PSI Validator" ); dialog.setResizable( true ); dialog.pack(); dialog.setVisible( true ); } } );
JDialog getModalDialog() { if (modalDialog == null) { modalDialog = new JDialog(); ImageIcon ii = new ImageIcon(GUIImages.CALENDAR); modalDialog.setIconImage(ii.getImage()); modalDialog.add(this); modalDialog.pack(); modalDialog.setResizable(false); modalDialog.setModal(true); } return modalDialog; }
JDialog jd=new JDialog(loginpage.this,"User Registration"); jd.setModal(true); jd.setLayout(null); // THIS IS A BAD IDEA // jd.setLocationRelativeTo(null); // This is somewhat pointless, you've set relative location, but know overridden it... // You should also be relying on the layout manager and pack to determine the size... jd.setBounds(400,300, 479, 329); jd.setResizable(false); setLocationRelativeTo(loginpage.this); // Add you other components jd.setVisible(true);
TransferMaskDialog(Window window, Product product, Product[] allProducts, Mask[] selectedMasks) { super(window, "Transfer Mask(s) to other product", ModalDialog.ID_OK_CANCEL | ModalDialog.ID_HELP, "transferMaskEditor"); this.sourceProduct = product; this.allProducts = allProducts; this.selectedMasks = selectedMasks; definitionMap = new HashMap<Product, ButtonModel>(); dataMap = new HashMap<Product, ButtonModel>(); getJDialog().setResizable(true); setContent(createUI()); }
/** * Shows a local error dialog for displaying one exception */ public static void showTaskDialog(BackgroundTaskManager mngr) { BackgroundTaskListPanel panel = new BackgroundTaskListPanel(mngr); JOptionPane optionPane = new JOptionPane(panel, JOptionPane.PLAIN_MESSAGE, JOptionPane.DEFAULT_OPTION); JDialog dlg = optionPane.createDialog(null, "Background Tasks"); dlg.setResizable(true); dlg.setVisible(true); } }
/** * Shows a local error dialog for displaying one exception */ public static void showTaskDialog(BackgroundTaskManager mngr) { BackgroundTaskListPanel panel = new BackgroundTaskListPanel(mngr); JOptionPane optionPane = new JOptionPane(panel, JOptionPane.PLAIN_MESSAGE, JOptionPane.DEFAULT_OPTION); JDialog dlg = optionPane.createDialog(null, "Background Tasks"); dlg.setResizable(true); dlg.setVisible(true); } }
/** * Shows a local error dialog for displaying one exception */ public static void showTaskDialog(BackgroundTaskManager mngr) { BackgroundTaskListPanel panel = new BackgroundTaskListPanel(mngr); JOptionPane optionPane = new JOptionPane(panel, JOptionPane.PLAIN_MESSAGE, JOptionPane.DEFAULT_OPTION); JDialog dlg = optionPane.createDialog(null, "Background Tasks"); dlg.setResizable(true); dlg.setVisible(true); } }
public static Object showDialogOptions(final Component _parent, final String _title, final JOptionPane _optionPane) { final JDialog d = _optionPane.createDialog(_parent, _title); // en fait c'est juste pour avoir le joli icone en haut a gauche d.setResizable(true); d.setModal(true); d.pack(); d.show(); d.dispose(); return _optionPane.getValue(); }
public static void showDialog(OWLEditorKit owlEditorKit) { PhysicalLocationPanel panel = new PhysicalLocationPanel(owlEditorKit); JOptionPane pane = new JOptionPane(panel, JOptionPane.PLAIN_MESSAGE, JOptionPane.DEFAULT_OPTION); JDialog dlg = pane.createDialog(owlEditorKit.getWorkspace(), "Ontology source locations"); dlg.setResizable(true); dlg.setVisible(true); }
public static void showDialog(OWLEditorKit owlEditorKit) { PhysicalLocationPanel panel = new PhysicalLocationPanel(owlEditorKit); JOptionPane pane = new JOptionPane(panel, JOptionPane.PLAIN_MESSAGE, JOptionPane.DEFAULT_OPTION); JDialog dlg = pane.createDialog(owlEditorKit.getWorkspace(), "Ontology source locations"); dlg.setResizable(true); dlg.setVisible(true); }
public static void showDialog(OWLEditorKit owlEditorKit) { PhysicalLocationPanel panel = new PhysicalLocationPanel(owlEditorKit); JOptionPane pane = new JOptionPane(panel, JOptionPane.PLAIN_MESSAGE, JOptionPane.CLOSED_OPTION); JDialog dlg = pane.createDialog(owlEditorKit.getWorkspace(), "Ontology source locations"); dlg.setResizable(true); dlg.setVisible(true); }
@Override public int show() { setContent(createUI()); this.getJDialog().getRootPane().registerKeyboardAction(e -> close(), KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_IN_FOCUSED_WINDOW); getJDialog().setResizable(false); return super.show(); }