pls help............

hello frnds i ma mukul
i am working on a java project in netbeans
i am using swing application
there is a use of JTabbedPane
for which i have to give the object of other class as a Parameter
but when i create another class outside the previous class it shows error that cannot find symbol;
the code below will will explain more

package ssca;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
import javax.swing.JTextField;

 * @author mukul
public class Main extends JFrame{
JTabbedPane tab1,tab2,tab3,tab4;

     * @param args the command line arguments
    public static void main(String[] args) {
        // TODO code application logic here
        Main obj=new Main();;
    void run()
        Cities obj2=new Cities();
       tab1=new javax.swing.JTabbedPane();

       tab1.addTab("cities",new CitiesPanel());
       tab1.addTab("color",new ColorPanel());
       tab1.addTab("flavor",new FlavorPanel());
       tab1.addTab("taste",new TastePanel());
    tab1.addTab("country",new CountriesPanel());//here is the error rest is working fine

class CitiesPanel extends JPanel
public CitiesPanel()

JButton btn=new JButton("Cities");
JTextField txt=new JTextField();
String s=txt.getText();
class ColorPanel extends JPanel
    public ColorPanel()
    JButton btn=new JButton("Color");


class FlavorPanel extends JPanel

    public FlavorPanel()
    JButton btn=new JButton("Flavor");
class TastePanel extends JPanel

    public TastePanel()

    JButton btn=new JButton("Taste");

now i have made another class CountriesPanel outside this class in same package...........

Edited 3 Years Ago by Reverend Jim: Fixed formatting

when i create the classs outside the class Main
it doesnt cals that class but shos error tha it cnnot find symbol

shos error tha it cnnot find symbol

Please copy and paste full text of the error message here.

What is the classpath set to when you compile the program?
It must point to the folder containing the package folder.

Edited 6 Years Ago by NormR1: n/a

i am using netbeans so it shows error at the time of writing the code........
the error is
cannot find symbol
symbol Method AddTab(java.lang.String,ssca.home2)
location class javax.swing.JTabbedPane

Sorry, I'm not familiar with the IDE's output.
Can you use the javac command to compile the program?
Here is a sample of its output: cannot find symbol
symbol  : variable var
location: class TestSorts
         var = 2;

Edited 6 Years Ago by NormR1: n/a

What will make it easier for us to diagnose is sending us the package that is giving you trouble. Just Zip the whole netbeans project and upload it so we can take a better look at it and see where you went wrong.

help required in modifiyng user interface for a desktop appilcation developed using swings. I need help in alignment and bascially giving my user interface a better look and feel.plz rfeply to

This article has been dead for over six months. Start a new discussion instead.