Re: open another jframe



On Jan 24, 11:48 pm, Knute Johnson <nos...@xxxxxxxxxxxxxxxxxxxxxxx>
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 ?
.



Relevant Pages

  • Re: Problem with setUndecorated() method in JFrame
    ... Knute Johnson ha scritto: ... Try changing your JFrame to a Frame and see if that helps. ...
    (comp.lang.java.gui)
  • Re: Relayout of JFrame?
    ... >> JPanel, I invalidate it, repaint it and then call pack() on the JFrame. ... >> shrink to fit the layout as it does with packbut still grow if ... Knute Johnson ...
    (comp.lang.java.programmer)
  • Make a cloneable object
    ... how to use the clonemethod to create a deep copy of a ... JFrame object. ... I need to "duplicate" a JFrame containing a TextField and then to add other ...
    (comp.lang.java.gui)
  • Re: open another jframe
    ... How do I open another JFrame from one JFrame? ... The first JFrame is a command prompt. ... Where I want to write draw f. ... You create a new JFrame object with the new operator and then you call ...
    (comp.lang.java.gui)
  • Re: open another jframe
    ... How do I open another JFrame from one JFrame? ... The first JFrame is a command prompt. ... Where I want to write draw f. ... You create a new JFrame object with the new operator and then you call the setVisiblemethod on that object with an argument of true. ...
    (comp.lang.java.gui)