Commit 7ba4f7b1 authored by Trisha Gee's avatar Trisha Gee
Browse files

[Ch14] First example has two actionPerformeds, which don't compile

parent d4e647f1
Loading
Loading
Loading
Loading
+18 −0
Changes for src/main/java/ch14/MyGui.java: 18 added lines, 0 removed lines.
Original line number Diff line number Diff line
package ch14;

import javax.swing.*;
import java.awt.event.*;

class MyGui implements ActionListener {
  private JFrame frame;
  private JLabel label;
  // lots of code here and then:

  public void actionPerformed(ActionEvent event) {
    frame.repaint();
  }

//  public void actionPerformed(ActionEvent event) {
//    label.setText("That hurt!");
//  }
}