How should I connect two GUI windows?
Ex:
I have window1 (components added to panel1 and panel1 added to frame1) with fields for login id and pwd and a login-button. After I enter data and click the button I want to see window2 (components added to panel2 and panel2 added to frame2) which shows some other information. To get this behavior, till now I used to create a new window2() in action handling part of code for login-button. So I am creating a new frame for every window in the application. A friend said that for security reasons its not the proper way to do. And that you usually should only have one frame for the entire app. And only change the panel you add to the frame depending on what you want to display. Is that true? I believe her but want to hear more from ranchers!
Thanks!
I added this post to
Java in General (beginner) but somewhow it showed up in Swing forum also !!
[ June 09, 2008: Message edited by: Preeti Yarla ]