Set JLabel Visível quando JButton é clicado em actionPerformed

Estou tentando fazer com que um JLabel apareça quando um JButton é clicado. Adicionei um ouvinte de ação e o componente ao layout. Estou usando o label1.setVisible (true) quando o JButton é clicado em actionPerformed. Ainda não consigo fazer o trabalho. Alguns podem olhar para o meu código?

public class LearnAppMain extends JFrame implements ActionListener {

// Define variables
public JButton button1;
public JLabel label1;
    public JTextField field1;

    private Image image1;
private String apple = "apple.jpg";

public LearnAppMain() {

    ImageIcon image1 = new ImageIcon(this.getClass().getResource(apple));
    JLabel label1 = new JLabel(image1);

    button1 = new JButton("A");
    button1.addActionListener(this);

    field1 = new JTextField(10);

    // Create layout
    setLayout(new FlowLayout());

    // create Container
    final Container cn = getContentPane();

    cn.add(button1);
    cn.add(field1);
    cn.add(label1);

    // setLayout(new FlowLayout());
    setSize(250, 250);
    setLocationRelativeTo(null);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setVisible(true);
}

@Override
public void actionPerformed(ActionEvent e) {

    Object source = e.getSource();

    if (e.getSource() == button1) {
        label1.setVisible(true);
        field1.setText("Apple");
    }

}

 }

Eu tenho meu método principal em outro arquivo de classe. O erro que recebo me leva ao label1.setVisible (true);

Toda pergunta que eu vi eles dizem para fazer isso, mas estou me perguntando se há algo mais que precise ser adicionad

questionAnswers(6)

yourAnswerToTheQuestion