i built a code in Frame class and call another class frame named search which contains bottun.
and i try to add this button action :
s=new Search();
s.button_1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg) {
String a =s.text_1.getText();
JOptionPane.showMessageDialog(new JFrame() ,a);...
I try to run this but it says
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException..