本文整理了Java中javax.swing.JDialog.setTitle()
方法的一些代码示例,展示了JDialog.setTitle()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JDialog.setTitle()
方法的具体详情如下:
包路径:javax.swing.JDialog
类名称:JDialog
方法名:setTitle
暂无
代码示例来源:origin: stackoverflow.com
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);
代码示例来源:origin: groovy/groovy-core
FIND_REPLACE_DIALOG.setTitle(title);
代码示例来源:origin: geotools/geotools
window.setTitle((String) value);
return;
代码示例来源:origin: protegeproject/protege
/**
* Sets the title of the generated javax.swing.JDialog.
* @param s The title of the dialog.
*/
public void setTitle(String s) {
wizardDialog.setTitle(s);
}
代码示例来源:origin: net.java.abeille/abeille
/**
* Sets the title to the frame
*/
public void setTitle(String title) {
super.setTitle(title);
}
代码示例来源:origin: bcdev/beam
/**
* @param title The dialog's title.
*/
public void setTitle(String title) {
dialog.setTitle(title);
}
代码示例来源:origin: com.google.code.validationframework/validationframework-swing
/**
* @see AbstractComponentProperty#setPropertyValueToComponent(Object)
*/
@Override
protected void setPropertyValueToComponent(String value) {
component.setTitle(value);
}
}
代码示例来源:origin: entertailion/Fling
public void run() {
progressDialog.setLocationRelativeTo(FlingFrame.this);
progressDialog.setTitle(message);
progressDialog.setVisible(true);
}
});
代码示例来源:origin: eugener/oxbow
/**
* Sets the title of the dialog
* @param title
*/
public void setTitle( String title ) {
dlg.setTitle( getString(title));
}
代码示例来源:origin: org.swinglabs.swingx/swingx-core
/**
* {@inheritDoc}
*/
@Override
public JDialog getErrorDialog(Component owner) {
JDialog dlg = super.getErrorDialog(owner);
dlg.setTitle(" ");
return dlg;
}
代码示例来源:origin: stackoverflow.com
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);
}
代码示例来源:origin: net.sf.squirrel-sql/squirrel-sql
@Override
public void setTitle(String title)
{
super.setTitle(title);
if(null != _widget)
{
_widget.setTitle(title);
}
}
代码示例来源:origin: EvoSuite/evosuite
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);
}
代码示例来源:origin: org.netbeans.api/org-openide-explorer
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();
}
代码示例来源:origin: ontop/ontop
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
代码示例来源:origin: net.sf.taverna.t2.ui-activities/biomoby-activity-ui
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);
}
代码示例来源:origin: net.sf.taverna.t2.activities/biomoby-activity-ui
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);
}
代码示例来源:origin: net.sf.taverna.t2.activities/biomoby-activity-ui
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);
}
代码示例来源:origin: matsim-org/matsim
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;
}
}
代码示例来源:origin: RPTools/maptool
public void actionPerformed(ActionEvent e) {
editorPanel.attach(null);
getEditorDialog().setTitle(I18N.getString("LookupTablePanel.msg.titleNew"));
getEditorDialog().setVisible(true);
imagePanel.clearSelection();
repaint();
}
});
内容来源于网络,如有侵权,请联系作者删除!