本文整理了Java中javax.swing.JDialog.setResizable()
方法的一些代码示例,展示了JDialog.setResizable()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JDialog.setResizable()
方法的具体详情如下:
包路径:javax.swing.JDialog
类名称:JDialog
方法名:setResizable
暂无
代码示例来源:origin: stanfordnlp/CoreNLP
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);
}
代码示例来源:origin: nodebox/nodebox
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;
}
代码示例来源:origin: magefree/mage
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();
代码示例来源:origin: geotools/geotools
parentSize = Toolkit.getDefaultToolkit().getScreenSize();
dialog.setDefaultCloseOperation(JDialog.HIDE_ON_CLOSE);
dialog.setResizable(false);
代码示例来源:origin: geotools/geotools
if (window instanceof JDialog) {
final JDialog window = (JDialog) JProgressWindow.this.window;
window.setResizable(true);
} else {
final JInternalFrame window = (JInternalFrame) JProgressWindow.this.window;
代码示例来源:origin: protegeproject/protege
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;
}
}
代码示例来源:origin: com.synaptix/SynaptixWidget
@Override
public void run() {
JDialog dlg = JXErrorPane.createDialog(owner, pane);
dlg.setResizable(false);
dlg.setVisible(true);
}
};
代码示例来源:origin: protegeproject/protege
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;
}
代码示例来源:origin: psidev.psi.mi/psimi-schema-validator
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 );
}
} );
代码示例来源:origin: org.japura/japura-gui
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;
}
代码示例来源:origin: stackoverflow.com
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);
代码示例来源:origin: bcdev/beam
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());
}
代码示例来源:origin: protegeproject/protege
/**
* 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);
}
}
代码示例来源:origin: edu.stanford.protege/org.protege.editor.core.application
/**
* 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);
}
}
代码示例来源:origin: org.protege/protege-editor-core-application
/**
* 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);
}
}
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-ui
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();
}
代码示例来源:origin: protegeproject/protege
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);
}
代码示例来源:origin: edu.stanford.protege/protege-editor-owl
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);
}
代码示例来源:origin: org.protege/protege-editor-owl
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);
}
代码示例来源:origin: senbox-org/snap-desktop
@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();
}
内容来源于网络,如有侵权,请联系作者删除!