Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 how do you import JWindow to a java file from another java file?
Index -> Programming, Java -> Java Tutorials
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
ChenWei




PostPosted: 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! Smile
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Java -> Java Tutorials
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 1 Posts ]
Jump to:   


Style:  
Search: