Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2007

Tip: Looking for answers? Try searching our database.

open a jframe using a button

Thread view: 
iszekeell@gmail.com - 12 Apr 2007 17:30 GMT
ok, I believe you will find this easy,
I've created 2 jframes in the same package testForum and addForum,
what I'm trying to do is open/call addForum from a button in
testForum, they are both in the same package, and I've use NetBeans to
create them.
can you help me please
Sanjay - 12 Apr 2007 17:54 GMT
> ok, I believe you will find this easy,
> I've created 2 jframes in the same package testForum and addForum,
> what I'm trying to do is open/call addForum from a button in
> testForum, they are both in the same package, and I've use NetBeans to
> create them.
> can you help me please

I just have one application experience of creating a swing application,
so my answer may not be 100% right.

I think you should create two panels within the same frame and show and
hide that instead of creating two separate frames.

What I did in my last application was, create a class which has handles
to all the panel classes and keep a pointer to that class in each panel
classes. Then I would just call show and hide methods. Hope this makes
sense.
iszekeell@gmail.com - 23 Apr 2007 18:47 GMT
thanks for the reply
tried it and it dose work, wasn't quite what i wanted but have a
solution

private void addButtonActionPerformed(java.awt.event.ActionEvent evt)
{
           this.setVisible(false);
           addAssetForm addasset = new  addAssetForm();
           addasset.setVisible(true);
   }
just create a new instance of the next form and then kill/hide the
other form

thanks again sorry for not getting back
sooner


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.