[SOLVED] Interface return type invalid
Hello there everyone, I'm in a bit of a predicament.
I'm trying to create a class with an interface. My code is as follows, though I've taken out all my variables and such. The class only has a few lines in it because I didn't want to add much more when it won't work as is.
When I compile it I get an 'Invalid method deceleration; return type required' problem. I'm fairly sure that an interface doesn't actually return things but I can't figure it out.
public class main extends JPanel
private JTextField objectField;
static Scanner sc = new Scanner(System.in);
public static void main (String args)
public Interface ()
JPanel stuff = new JPanel ();
stuff.add(new JLabel("Object: "));
stuff.add(objectField = new JTextField(5));
Sorry if this is a stupid mistake, thanks for any help!