To Whom It May Concern:

I am sorry to trouble you with a lenghty forum post, however I was wondering if anyone would be able to assist me in this matter. To reiterate, I am a beginner to Java programming. I am currently reading a book teaching Java game programming (my current interest) and practicing the activities contained in this book. I have hit a roadblock in my quest to complete one of the activities. The book requires (and therefore I am using) Java SE 6 and TextPad.

The program is saved as JFrameDemo.java.

The code is written as:

package jframedemo;
import javax.swing.*;
import java.awt.*;

public class JFrameDemo extends JFrame
{

public JFrameDemo()
{
super("JFrameDemo");
setSize(400,400);
setVisible(true);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

}

public void paint(Graphics g)
{

super.paint(g);
g.setColor(Color.WHITE);
g.fillRect(0,0,400,400);
g.setColor(Color.orange);
g.setFont(new Font("Arial", Font.BOLD,18));
g.drawString("Doing graphics with a JFrame!", 60, 200);
}

public static void main(String[] args)
{

new JFrameDemo();

}
}

The error I receive is:

Exception in thread "main" java.lang.NoClassDefFoundError: jframedemo/JFrameDemo

Caused by: java.lang.ClassNotFoundException: jframedemo.JFrameDemo
at java.net.URLClassLoader$1.run<URLClassLoader.java: 202>
at java.security.AccessController.doPrivileged<Native Method>
at java.net.URLClassLoader.findClass<URLClassLoader.j ava:190>
at java.lang.ClassLoader.loadClass<ClassLoader.java:3 06>
at sun.misc.Launcher$AppClassLoader.loadClass<Launche r.java:301>
at java.lang.ClassLoader.loadClass<ClassLoader.java:2 47>
Could not find the main class:jframedemo.JFrameDemo. Program will exit.
Press any key to continue...

For the past few hours prior to signing up for this forum, I had been researching this issue and seen multiple responses on how to remedy this issue. Most involved classpath. The only file I could locate was the "JFrameDemo.java" file which I had saved on My Documents myself. I do not have any knowledge as to how to locate the classpaths of files such as the javax.swing and java.awt files, if that happens to be the remedy. If you could, kindly explain to me the answer to my inquiry, as well as to how to locate the classpaths on my computer and change them if necessary.

Once again, I would like to apologize for this rather complicated and tedious question and post. I would appreciate any input you have to offer to what seems to me to be quite an involved process. Thank you very much for your assistance.