예제 #1
0
 protected JButton createOkButton() {
   FixedSizeButton okButton = new FixedSizeButton("OK", 80, -1);
   okButton.addActionListener(
       new ActionListener() {
         public void actionPerformed(ActionEvent e) {
           onOk();
         }
       });
   return okButton;
 }
예제 #2
0
 protected JButton createCancelButton() {
   FixedSizeButton cancelButton = new FixedSizeButton("Cancel", 80, -1);
   cancelButton.addActionListener(
       new ActionListener() {
         public void actionPerformed(ActionEvent e) {
           onCancel();
         }
       });
   return cancelButton;
 }