コード例 #1
0
 private void setupOKButton(final JButton okButton) {
   okButton.setEnabled(model.isSaveAllowed());
   okButton.addActionListener(
       l -> {
         model.save();
         dialog.dispose();
       });
 }
コード例 #2
0
 private void setupCancelButton(final JButton cancelButton) {
   cancelButton.addActionListener(l -> dialog.dispose());
 }