public void actionPerformed(ActionEvent actionEvent) { setVisible(false); okClicked = false; } });
RequesterPaysDialog dialog = new RequesterPaysDialog(selectedBucket, ownerFrame, this); dialog.setVisible(true); if (!dialog.getOkClicked()) { return; final boolean newRequesterPaysFlag = dialog.isRequesterPaysSelected(); dialog.dispose();
this.getRootPane().setDefaultButton(okButton); this.getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW) .put(KeyStroke.getKeyStroke("ESCAPE"), "ESCAPE"); this.getRootPane().getActionMap().put("ESCAPE", new AbstractAction() { private static final long serialVersionUID = -6225706489569112809L; panel.add(buttonsPanel, new GridBagConstraints(0, ++row, 2, 1, 0, 0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, insetsDefault, 0, 0)); this.getContentPane().setLayout(new GridBagLayout()); this.getContentPane().add(panel, new GridBagConstraints(0, 0, 1, 1, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH, insetsDefault, 0, 0)); this.pack(); this.setResizable(false); this.setLocationRelativeTo(ownerFrame);
RequesterPaysDialog dialog = new RequesterPaysDialog(selectedBucket, ownerFrame, this); dialog.setVisible(true); if (!dialog.getOkClicked()) { return; final boolean newRequesterPaysFlag = dialog.isRequesterPaysSelected(); dialog.dispose();
this.getRootPane().setDefaultButton(okButton); this.getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW) .put(KeyStroke.getKeyStroke("ESCAPE"), "ESCAPE"); this.getRootPane().getActionMap().put("ESCAPE", new AbstractAction() { private static final long serialVersionUID = -6225706489569112809L; panel.add(buttonsPanel, new GridBagConstraints(0, ++row, 2, 1, 0, 0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, insetsDefault, 0, 0)); this.getContentPane().setLayout(new GridBagLayout()); this.getContentPane().add(panel, new GridBagConstraints(0, 0, 1, 1, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH, insetsDefault, 0, 0)); this.pack(); this.setResizable(false); this.setLocationRelativeTo(ownerFrame);
public void actionPerformed(ActionEvent actionEvent) { setVisible(false); okClicked = false; } });
public void actionPerformed(ActionEvent event) { if (event.getSource().equals(okButton)) { this.setVisible(false); okClicked = true; } else if (event.getSource().equals(cancelButton)) { this.setVisible(false); okClicked = false; } }
public void actionPerformed(ActionEvent event) { if (event.getSource().equals(okButton)) { this.setVisible(false); okClicked = true; } else if (event.getSource().equals(cancelButton)) { this.setVisible(false); okClicked = false; } }