If I click on the button, an error appears. How is this possible? My result has to be that if I click on the button, the label "text1" should get the text of the ComboBox.
import javax.swing.*;
import java.awt.*;
public class Naveed extends JFrame {
    public static void main(String[] args) {
        JFrame frame = new Naveed();
        frame.setSize(400, 400);
        frame.setDefaultCloseOperation(frame.EXIT_ON_CLOSE);
        frame.setTitle("Rechthoek");
        Paneel paneel = new Paneel();
        frame.setContentPane(paneel);
        frame.setVisible(true);
    }
}
//
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Paneel extends JPanel {
    private JComboBox abc;
    private JLabel text1;
    public Paneel() {
        String[] items = {"Item1", "Item2", "Item3"};
        JComboBox abc = new JComboBox(items);
        JButton button1 = new JButton("Click");
        button1.addActionListener(new knopHandler());
        JLabel text1 = new JLabel("Result");
        add(abc);
        add(button1);
        add(text1);
    }
    class knopHandler implements ActionListener {
        public void actionPerformed (ActionEvent e) {
            String s = abc.getSelectedItem().toString();
            text1.setText(s);
        }
    }
}
 
    