I had a syntax error one the line with the serialVersionUID. to fix this error i had to place a bracket at the end of that line and close it at the end of my code... my question is Why? There was no need for this in the file that contains the Jframe... also what is serialVersionUID? I apologize if my questions seem elementary, I'm new to Programming, newer to java, and this is my 3ed day on GUI's.
import javax.swing.*;
public class HangmanPanel extends JPanel{
private static final long serialVersionUID = -1767262708330188227L;{
this.setLayout(null);
JLabel heading = new JLabel("Welcome to the Hangman App");
JButton Button = new JButton("Ok");
//get input
JLabel tfLable = new JLabel("Please Enter a Letter:");
JTextField text = new JTextField(10);
heading.setSize(200, 50);
tfLable.setSize(150, 50);
text.setSize(50, 30);
Button.setSize(60, 20);
heading.setLocation(300, 10);
tfLable.setLocation(50, 40);
text.setLocation(50, 80);
Button.setLocation(100, 85);
this.add(heading);
this.add(tfLable);
this.add(text);
this.add(Button);
}}