how to call another java file using button click +netbeans
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ahamed_B
Posted On:   Thursday, July 6, 2006 10:32 AM

Using Netbeans IDE I developed Two GUI(Graphical user interface),both are saved as different java file.I wants to call another gui by click a button .Pls give me a suggestion
Thanks and regards

Re: how to call another java file using button click +netbeans

Posted By:   Byron_Tymvios  
Posted On:   Thursday, July 6, 2006 10:39 AM


Your question is a little vague, do you mean you want to bring up the actual source file? Or do you mean you want to show the one GUI after having clicked a button in the other GUI?


You also don't specify how you designed them, are you using swing? Are you using frames or panels? Please give a little more info if you want some proper suggestions.


If what you want to do is show one JFrame after clicking a button on another JFrame, then this is what you would generally do:

-Register an ActionListener to recieve events on your button.

-On the event create an object of the other GUI you want to display.

-Use the setVisible(true) method of JFrame to pack and show the other GUI.


Hope This Helps

Byron

About | Sitemap | Contact