Refine search
final JDialog d = new JDialog(); d.setSize(200,200); d.setLocationRelativeTo(null); d.setVisible(true);
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); }
final JDialog d = new JDialog(); d.setSize(200, 200); final Toolkit toolkit = Toolkit.getDefaultToolkit(); final Dimension screenSize = toolkit.getScreenSize(); final int x = (screenSize.width - d.getWidth()) / 2; final int y = (screenSize.height - d.getHeight()) / 2; d.setLocation(x, y); d.setVisible(true);
JDialog dialog = new JDialog(SwingUtilities.windowForComponent(this)); dialog.setModal(true); dialog.setSize(...); dialog.setVisible( true );
/** * Create a progress indicator */ private void createProgressDialog() { progressDialog = new JDialog(this, resourceBundle.getString("progress.title"), true); JProgressBar progressBar = new JProgressBar(0, 100); progressBar.setStringPainted(true); progressBar.setIndeterminate(true); progressDialog.add(BorderLayout.CENTER, progressBar); progressDialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE); progressDialog.setSize(300, 75); progressDialog.setLocationRelativeTo(this); }
private void installPlugin(final File plugin) { final JDialog dialog = new JDialog(frame, "Installing Plugin", true); dialog.getContentPane().setLayout(new BorderLayout()); JProgressBar bar = new JProgressBar(); dialog.getContentPane().add(bar, BorderLayout.CENTER); dialog.pack(); dialog.setSize(225, 55); dialog.setVisible(true);
public void editMetadata() { if (getActiveNode() == null) return; JDialog editorDialog = new NodeAttributesDialog(NodeBoxDocument.this); editorDialog.setSize(580, 751); editorDialog.setLocationRelativeTo(NodeBoxDocument.this); editorDialog.setVisible(true); }
final JDialog dialog = new JDialog(frame, "Jar File Chooser", true); dialog.setLocation(location); final JList fileList = new JList(new Vector<>(files)); okay.setText("Okay"); okay.setToolTipText("Okay"); okay.addActionListener(evt -> dialog.setVisible(false)); JButton cancel = new javax.swing.JButton(); cancel.setText("Cancel"); cancel.addActionListener(evt -> { fileList.clearSelection(); dialog.setVisible(false); }); dialog.add(cancel); dialog.pack(); dialog.setSize(dialog.getPreferredSize()); dialog.setVisible(true);
public static void main(String args[]) { JFrame window = new JFrame("l"); window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // <-- Handle closing // the window. Color black = new Color(0, 0, 0); window.setBackground(black); window.setSize(new Dimension(500, 500)); // <-- set a size. window.setVisible(true); // <-- set it visible. JDialog start = new JDialog(window, ";;"); start.setSize(new Dimension(300, 300)); // <-- set a size. start.setVisible(true); // <-- set it visible. }
JButton cancel = new javax.swing.JButton(); JDialog dialog = new JDialog(new Frame(), "Parser Progress", true); dialog.setSize(300, 150); dialog.add(BorderLayout.NORTH, new JLabel("Parsing " + sentences.size() + " sentences")); dialog.setVisible(true);
public static void main(String[] args) { JFrame frame = new JFrame("Test"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(400,400); frame.setLocationRelativeTo(null); frame.setVisible(true); JDialog dialog = new JDialog(frame); dialog.setSize(200,200); dialog.setLocationRelativeTo(frame); dialog.setModal(true); // Works also with .setModal(false) dialog.setVisible(true); }
/** * This method initializes openUrlDialog * * @return javax.swing.JDialog */ private JDialog getOpenUrlDialog() { if (openUrlDialog == null) { openUrlDialog = new JDialog(); openUrlDialog.setContentPane(getOpenUrlContentPane()); openUrlDialog.setSize(425,125); } openUrlStatusLabel.setText("Enter the URL of the configuration file:"); openUrlTextField.setText("http://"); return openUrlDialog; }
JDialog first = new JDialog(); first.setSize(new Dimension(80,80)); JDialog second = new JDialog(); second.setSize(new Dimension(80,80)); first.setVisible(true); second.setVisible(true);
JDialog dialog=new JDialog(frmInstance); dialog.setUndecorated(true); dialog.setVisible(true); dialog.setSize(200,100);
/** * This method initializes openUrlDialog * * @return javax.swing.JDialog */ private JDialog getOpenUrlDialog() { if (openUrlDialog == null) { openUrlDialog = new JDialog(); openUrlDialog.setContentPane(getOpenUrlContentPane()); openUrlDialog.setSize(425,125); } openUrlStatusLabel.setText("Enter the URL of the configuration file:"); openUrlTextField.setText("http://"); return openUrlDialog; }
JDialog d = new JDialog(); d.setSize(200, 200); d.setVisible(true);
JDialog dialog = new JDialog(SwingUtilities.windowForComponent(this)); dialog.setModal(true); dialog.setSize(200, 200); dialog.setVisible(true);