|
|
open another jframe
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
|
|
0
|
|
|
|
Reply
|
Akki
|
1/24/2008 11:57:38 AM |
|
Akki wrote:
> 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
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.
--
Knute Johnson
email s/nospam/knute/
--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
------->>>>>>http://www.NewsDem
|
|
0
|
|
|
|
Reply
|
Knute
|
1/24/2008 6:48:46 PM
|
|
On Jan 24, 11:48 pm, Knute Johnson <nos...@rabbitbrush.frazmtn.com>
wrote:
> Akki wrote:
> > 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
>
> 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.
>
> --
>
> Knute Johnson
> email s/nospam/knute/
>
> --
> 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 ?
|
|
0
|
|
|
|
Reply
|
Akki
|
1/25/2008 8:45:55 AM
|
|
Akki wrote:
> On Jan 24, 11:48 pm, Knute Johnson <nos...@rabbitbrush.frazmtn.com>
> wrote:
>> Akki wrote:
>>> 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
>> 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.
>>
>> --
>>
>> Knute Johnson
>> email s/nospam/knute/
>>
>> --
>> 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 ?
f1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f2.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
|
|
0
|
|
|
|
Reply
|
RedGrittyBrick
|
1/25/2008 10:51:22 AM
|
|
|
3 Replies
584 Views
(page loaded in 0.271 seconds)
Similiar Articles: open another jframe - comp.lang.java.guiHi, 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 anoth... Open new JPanel (JFrame, ...) by clicking JButton - comp.lang.java ...Hello everybody, I'm writing a program in Java, in which I want to use more than one window. Can anyone tell me how I can open a new JPanel (or perha... show JFrame as if a dialog - comp.lang.java.guiHey, I have JFrame MAIN, and i want to open a new JFrame from that frame but has it like a dialog...where you can not reselect MAIN until the new fra... Preventing A New Window From Grabbing Focus - comp.lang.java ...Preventing A New Window From Grabbing Focus - comp.lang.java ..... it triggers the "cancel" button.I'd like to just open this JFrame window ... finally got a chance to ... Passing Variable from One class to another, using an ...Passing Variable from One class to another, using an ... Open new JPanel (JFrame, ...) by clicking JButton - comp.lang.java ... In that ActionListener, you will need to ... JFrame with a JDesktopPane - comp.lang.java.guiOpen source has a similar approach, but it is "suggest a patch ... With the JInternalFrame class you can display a JFrame-like window within another ... Replacing an existing jPanel with a new jPanel - comp.lang.java ...... any sense, you might also use a JTabbedPane and add the new JPanel to a new ... we create a File selector cell using a JPanel and JButton. ... Open new JPanel (JFrame ... How to prevent JPanel losing focus ? - comp.lang.java.gui ...Preventing A New Window From Grabbing Focus - comp.lang ... Custom JFrame Header - comp.lang.java.gui How to prevent ... How do I capture the open-in-new-window/tab event ... window.open forces page to refresh when back button is clicked ...After you submit it, a new page comes up. If you hit the back button, the form ... character, it triggers the "cancel" button.I'd like to just open this JFrame window ... Correct "Dispose" of junk JPanel (not JFrame) - comp.lang.java.gui ...Correct "Dispose" of junk JPanel (not JFrame) Follow ... than the above remove() before I start building another ... Also, not more than one Address Book dialog may be open ... open another jframe - Application Forum at ObjectMix.comHi, 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 How To Open New Jframe From A Button - Java | Dream.In.CodeClicking A Button To Open A New JFrame And Then Close The Recent JFram; Closing A JFrame - JFrame To Close A Frame And Open New Frame Simultaneously In Single Bu 7/21/2012 8:20:38 AM
|
|
|
|
|
|
|
|
|