17221723172417251726172717281729173017311732
contentPane.add(makeCenterPanel(), BorderLayout.CENTER); JPanel southpan = new JPanel(); JButton okButton = new JButton("OK"); okButton.addActionListener(this); southpan.add(okButton); contentPane.add(southpan, BorderLayout.SOUTH); pack();
141142143144145146147148149150151
JButton createButton(String title, int accel) { JButton b = new MyButton(title); this.add(b); b.setMnemonic(accel); b.addActionListener(this); return b; } public void actionPerformed(ActionEvent ae) { try {