PDA

View Full Version : [HELP] i have one error



rockstar jax
February 25th, 2011, 12:28
i have a error while i was trying to add a control panel heres the error

.
\ricky\Engine.java:169: cannot find symbol
symbol : variable JFrame
location: class ricky.Engine
Startupp.setDefaultCloseOperation(JFrame.EXIT_ON_C LOSE); //How i
t closes
^
1 error
Press any key to continue . . .

the code is

}

/**
GUI
*/
public void Startup() {
Gui Startupp = new Gui();
Startupp.setDefaultCloseOperation(JFrame.EXIT_ON_C LOSE); //How it closes
Startupp.setSize(450, 75); //The size, adjust the numbers to make bigger/smaller
Startupp.setVisible(true); //makes it visible.
Startupp.setResizable(false);
}



/**

and belongs in engine.java

Ezpilz
February 25th, 2011, 13:12
\ricky\Engine.java:169: cannot find symbol symbol : variable JFrame location: class ricky.Engine Startupp.setDefaultCloseOperation(JFrame.EXIT_ON_C LOSE); //How i t closes ^ 1 error Press any key to continue . . .

listen, did you see
(JFrame.EXIT_ON_CLOSE)

try exchanging the
JFrame to
Jframe or
jFrame

try both, if doesn't work, so i got some words for ya..

delete it! , put everything in the control panel as a command! its better.

Hope i helped :)

Nouish
February 27th, 2011, 13:01
I'd help if you posted in the correct section.

Tunechi
February 27th, 2011, 13:10
Also, make sure you've defined JFrame and imported the class that holds the varible if so.