Problem Calling Classes

hi all,

I am trying to follow the DiveLog example from the java sun site and i facing an error saying: compile error can't resolve symbole and points at the class name. here is my code:

package divelog;

import javax.swing.*;

import java.awt.*;

import java.awt.event.*;

/**

*

* @author Administrator

*/

public class DiveLog {

private JFrame dlframe; //Not assigned yet.

private JTabbedPane tabbedPane; //Not assigned yet.

/** Creates a new instance of Class */

public DiveLog() {

// Create a frame object to add the

// application GUI components to.

dlframe = new JFrame("A Java Technology Dive Log");

// Closes from title bar

//and from menu

dlframe.addWindowListener(new WindowAdapter()

{

public void windowClosing(WindowEvent e)

{

System.exit(0);

}

});

// Tabbed pane with panels for Jcomponents

// Instantiate JTabbedPane with keyword new

tabbedPane = new JTabbedPane(SwingConstants.LEFT);

// Calls method to set color

tabbedPane.setBackground(Color.blue);

tabbedPane.setForeground(Color.white);

//A method that adds individual tabs to the

//tabbedpane object.

populateTabbedPane();

//Calls the method that builds the menu

buildMenu();

dlframe.getContentPane().add(tabbedPane);

dlframe.pack();

dlframe.setSize(765, 690);

dlframe.setBackground(Color.white);

dlframe.setVisible(true);

}// Ends constructor

private void populateTabbedPane()

{

// Create tabs with title

tabbedPane.addTab(

"Welcome",

null,

new Welcome(),

"Welcome to the Dive Log");

tabbedPane.addTab(

"Diver Data",

null,

new Diver(),

"Click here to enter diver data");

tabbedPane.addTab(

"Log Dives",

null,

new Dives(),

"Click here to enter dives");

tabbedPane.addTab(

"Statistics",

null,

new Statistics(),

"Click here to calculate" +

" dive statistics");

tabbedPane.addTab(

"Favorite Web Site",

null, new WebSite(),

"Click here to see a web site");

tabbedPane.addTab(

"Resources",

null,

new Resources(),

"Click here to see a list " +

"of resources");

}//Ends populateTabbedPane method

} //end of class

in the private void populateTabbedPane method i am calling 6 classes that basically do nothing (yet) but my class can't recognize them. here is the code for one of the classes that can't be recognized:

package divelog;

/*

* Diver.java

*

* Created on October 31, 2004, 2:20 PM

*/

import javax.swing.*;

//import for layout manager

import java.awt.*;

/**

*

* @author Administrator

*/

public class Diver extends JPanel {

/** Creates a new instance of Diver */

public Diver() {

}

}

i have all of the classes in the same folder (divelog) and same spelling but keep getting a compile error. Anyone knows?

thanks a lot

[3216 byte] By [netjsp] at [2007-9-30 21:15:09]
# 1

The compile error tells you the class, file, and line number where the error occurs.

Sounds like you've got a CLASSPATH problem. Use the -classpath option to tell javac.exe where to start looking for the files it needs. And do learn about how CLASSPATH works. It's the #1 noob problem.

http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/classpath.html

%

duffymo at 2007-7-7 2:48:10 > top of Java-index,Security,Event Handling...
# 2

thanks duffymo for your reply, you are right, my problem is with the CLASSPATH.

Is there anyway i can setup the classpath from my NetBean IDE 3.6 editor? i tried setting it from my command prompt like the following:

SET CLASSPATH=C:\divelog it didn't give me no errors but when i tried to compile my program again i got the same error msg

thanks again

netjsp at 2007-7-7 2:48:10 > top of Java-index,Security,Event Handling...