示例#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;
 }