title: Error: Could not find or load main class
body: <p>I'm new to Java programming and doing this as a project for school.  Here's the code I've written</p>
  
  <pre><code>public static void main(String args[])
  import javax.swing.*;
  import java.awt.event.*;
  public class SleepCounter extends JFrame {
    private JPanel panel;
    private JLabel messageLabel;
    private JTextField sleepTextField;
    private JTextField sleepAnswerField;
    private final int WINDOW_WIDTH = 310;
    private final int WINDOW_HEIGHT = 100;
    public SleepCounter() {
      setTitle("Sleep Counter");
      setSize(WINDOW_WIDTH, WINDOW_HEIGHT);
      setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      buildPanel();
      add(panel);
      setVisible(true);
    }
    private void buildPanel() {
      dailyLabel = new JLabel("Enter Sleep " + "in hours");
      hourTextField = new JTextField(10);
      CalcButton = new JButton("Calculate");
      CalcButton.addActionListener(new CalcButtonListener());
      panel = new JPanel();
      panel.add(dailyLabel);
      panel.add(sleepTextField);
      panel.add(CalcButton);
      panel.add(sleepAnswerField);
    }
    private class CalcButtonListener implements ActionListener {
      public void actionPerformer(ActionEvent e) {
        String input;
        int total;
        input = sleepTextField.getText();
        for (int i = 0; i &lt; 7; i++); {
          input += total;
        }
        JOptionPane.showMessageDialog(null, "The total amount of sleep for " + (i + 1) + "days is" + total);
        if (int i &gt; 7) {
          double avg = (total / 7);
          JOptionPane.showMessageDialog(null, "The avg amount of sleep for 7 days is" + avg);
        }
      }
    }
  }
  </code></pre>
  
  <p>When running I get an error message saying:</p>
  
  <pre><code>Error: Could not find or laod main class Graduation Project.
  </code></pre>
  
  <p>I've done a search of this site and checked the answers as much as I know how.  I would appreciate any help that you offer.  </p>