as for here:showMessageDialog(null, full_name, "Name",JOptionPane.ERROR_MESSAGE);
you need to specify where you can find that method, since you write as if you have it locally, which you don't. replace it by this:JOptionPane.showMessageDialog(null, full_name, "Name",JOptionPane.ERROR_MESSAGE);