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 / GUI / January 2008

Tip: Looking for answers? Try searching our database.

open another jframe

Thread view: 
Akki - 24 Jan 2008 11:57 GMT
Hi,

How do I open another JFrame from one JFrame ?

The first JFrame is a command prompt. Where I want to write draw f(x).
Then I want to open another JFrame inwhich I show the plot of f(x).

TIA,
Darth
Knute Johnson - 24 Jan 2008 18:48 GMT
> Hi,
>
[quoted text clipped - 5 lines]
> TIA,
> Darth

You create a new JFrame object with the new operator and then you call
the setVisible() method on that object with an argument of true.

Signature

Knute Johnson
email s/nospam/knute/

     ------->>>>>>http://www.NewsDem

Akki - 25 Jan 2008 08:45 GMT
On Jan 24, 11:48 pm, Knute Johnson <nos...@rabbitbrush.frazmtn.com>
wrote:
> > Hi,
>
[quoted text clipped - 17 lines]
> Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
>       ------->>>>>>http://www.NewsDem

Thanks ! I it worked. But now when I close the second JFrame window,
the first one closes too.
How do I decouple them ?
RedGrittyBrick - 25 Jan 2008 10:51 GMT
> On Jan 24, 11:48 pm, Knute Johnson <nos...@rabbitbrush.frazmtn.com>
> wrote:
[quoted text clipped - 19 lines]
> the first one closes too.
> How do I decouple them ?

f1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f2.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);


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



©2008 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.