how do you import JWindow to a java file from another java file?
Author |
Message |
ChenWei
|
Posted: Wed Dec 28, 2011 9:27 pm Post subject: how do you import JWindow to a java file from another java file? |
|
|
hey guys, i am currently making a tic tac toe game for my project.
My concept is put the main menu in a main file, the game in another file, using JWindow, and the scores is another file, using JTextfiled.
my question is, how do i import the game window to the main file? i tried to use the statement(panel1(p1) is the main screen, panel2(p2) is the game and p3 is the scores, gameWindow is what i call the JWindow): p2.add(gameWindow);
obviously, it doesnt work because it doesnt know where to find the gameWindow(the file is called game.java). can anyone tell me the correct statement for adding window from another file?
thank you so much! |
|
|
|
|
|
Sponsor Sponsor
|
|
|
|
|