final JOptionPane optionPane = new JOptionPane("Hello world", JOptionPane.INFORMATION_MESSAGE, JOptionPane.DEFAULT_OPTION, null, new Object[]{}, null); final JDialog dialog = new JDialog(); dialog.setTitle("Message"); dialog.setModal(true); dialog.setContentPane(optionPane); dialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE); dialog.pack(); //create timer to dispose of dialog after 5 seconds Timer timer = new Timer(5000, new AbstractAction() { @Override public void actionPerformed(ActionEvent ae) { dialog.dispose(); } }); timer.setRepeats(false);//the timer should only go off once //start timer to close JDialog as dialog modal we must start the timer before its visible timer.start(); dialog.setVisible(true);
FIND_REPLACE_DIALOG.setTitle(title);
window.setTitle((String) value); return;
/** * Sets the title of the generated javax.swing.JDialog. * @param s The title of the dialog. */ public void setTitle(String s) { wizardDialog.setTitle(s); }
/** * Sets the title to the frame */ public void setTitle(String title) { super.setTitle(title); }
/** * @param title The dialog's title. */ public void setTitle(String title) { dialog.setTitle(title); }
/** * @see AbstractComponentProperty#setPropertyValueToComponent(Object) */ @Override protected void setPropertyValueToComponent(String value) { component.setTitle(value); } }
public void run() { progressDialog.setLocationRelativeTo(FlingFrame.this); progressDialog.setTitle(message); progressDialog.setVisible(true); } });
/** * Sets the title of the dialog * @param title */ public void setTitle( String title ) { dlg.setTitle( getString(title)); }
/** * {@inheritDoc} */ @Override public JDialog getErrorDialog(Component owner) { JDialog dlg = super.getErrorDialog(owner); dlg.setTitle(" "); return dlg; }
JButton nextButton = new JButton("Next"); nextButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { JDialog dialog = new JDialog(); dialog.setTitle("Title"); dialog.setModal(true); dialog.getContentPane().add(...); // add components here dialog.pack(); dialog.setVisible(true); }
@Override public void setTitle(String title) { super.setTitle(title); if(null != _widget) { _widget.setTitle(title); } }
public void setDialogTitle(String dialogTitle) { String oldValue = this.dialogTitle; this.dialogTitle = dialogTitle; if(dialog != null) { dialog.setTitle(dialogTitle); } firePropertyChange(DIALOG_TITLE_CHANGED_PROPERTY, oldValue, dialogTitle); }
public void showProperties(Node[] nodes) { PropertySheet ps = new PropertySheet(); ps.setNodes(nodes); JDialog d = new JDialog(); d.setTitle("Properties"); // XXX I18N d.setModal(true); d.getContentPane().setLayout(new BorderLayout()); d.getContentPane().add(ps, BorderLayout.CENTER); d.pack(); d.setVisible(true); d.dispose(); }
private void cmdAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdAddActionPerformed // Open a save dialog if it is a new query JDialog saveDialog = new JDialog(); saveDialog.setTitle("New Query"); saveDialog.setModalityType(ModalityType.MODELESS); SaveQueryPanel savePanel = new SaveQueryPanel("", saveDialog, queryController); saveDialog.getContentPane().add(savePanel, java.awt.BorderLayout.CENTER); saveDialog.pack(); DialogUtils.centerDialogWRTParent(this, saveDialog); DialogUtils.installEscapeCloseOperation(saveDialog); saveDialog.setVisible(true); }//GEN-LAST:event_cmdAddActionPerformed
public void actionPerformed(ActionEvent e) { AddParserActionHelper helper = new AddParserActionHelper(); Component component = helper.getComponent(activity); final JDialog dialog = new HelpEnabledDialog(owner, helper.getDescription(), false, null); dialog.getContentPane().add(component); dialog.pack(); // dialog.setSize(helper.getFrameSize()); dialog.setTitle(helper.getDescription()); // dialog.setModal(false); dialog.setVisible(true); }
public void actionPerformed(ActionEvent e) { BiomobyActionHelper helper = new BiomobyActionHelper(); Dimension size = helper.getFrameSize(); Component component = helper.getComponent(activity); final JDialog dialog = new JDialog(owner, false); dialog.getContentPane().add(component); dialog.pack(); dialog.setTitle(helper.getDescription()); dialog.setSize(size); dialog.setModal(false); dialog.setVisible(true); }
public void actionPerformed(ActionEvent e) { AddParserActionHelper helper = new AddParserActionHelper(); Component component = helper.getComponent(activity); final JDialog dialog = new JDialog(owner, false); dialog.getContentPane().add(component); dialog.pack(); dialog.setSize(helper.getFrameSize()); dialog.setTitle(helper.getDescription()); dialog.setModal(false); dialog.setVisible(true); }
private static JDialog newChartDialog(JFreeChart chart, String title, boolean modal) { chart.setTitle(title); JDialog dialog = new JDialog(); dialog.setTitle(title); dialog.setContentPane(new ChartPanel(chart)); dialog.setModal(modal); dialog.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); return dialog; } }
public void actionPerformed(ActionEvent e) { editorPanel.attach(null); getEditorDialog().setTitle(I18N.getString("LookupTablePanel.msg.titleNew")); getEditorDialog().setVisible(true); imagePanel.clearSelection(); repaint(); } });