iTEgg
iTEgg

Reputation: 8342

Java Object Creation Error

package Sartre.Connect4;

import javax.swing.*;


public class ChatGUI extends JDialog {

public ChatGUI(){

    setTitle("Chat");

}

}

when i do this in another class in the same package:

ChatGUI chatGUI = new ChatGUI();

i end up with a situation: Cannot Find Symbol

please help?

Upvotes: 0

Views: 192

Answers (2)

Michael Borgwardt
Michael Borgwardt

Reputation: 346317

"Cannot Find Symbol" means that the compiler cannot find a class, method or field that's being used in your code (it wil also tell you exactly which one). This means one of two things:

  • The class/method/field name is mistyped
  • The compiler cannot find it in its classpath

Upvotes: 3

Jeremy
Jeremy

Reputation: 2956

Are both files in the directory

<project root>/Sartre/Connect4 ?

It might mess things up if the structure is

<project root>/Sarte.Connect4

Upvotes: 2

Related Questions