JFrame problem

Discussion in 'Java' started by matrix, Nov 2, 2006.

  1. matrix

    matrix Guest

    I try to develop a program that has a mainFrame with button to open
    frame_1
    my problem is:

    ***when I close frame_1 the whole program close but I need to close
    this frame only ; is there a method in JFrame class to close frame_1
    only.

    ***also,I want to disable the maximize button in the mainFrame

    THANKS very MUCH!!!
     
    matrix, Nov 2, 2006
    #1
    1. Advertising

  2. Sub: JFrame problem

    Note that:
    - comp.lang.java.gui is specialised for GUI matters.
    - 'JFrame close/maximize' might have been a better title

    matrix wrote:
    > I try to develop a program that has a mainFrame with button to open
    > frame_1


    Both those are poor names for classes.
    Does your IDE let you change them?

    > my problem is:
    >
    > ***when I close frame_1 the whole program close but I need to close
    > this frame only ; is there a method in JFrame class to close frame_1
    > only.


    Yes. It's listed in the API docs.
    <http://java.sun.com/j2se/1.5.0/docs/api/overview-summary.html>
    More specifically..
    <http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JFrame.html>
    Look for 'close operation'.

    > ***also,I want to disable the maximize button in the mainFrame


    Also listed under 'extended state' (inherited from Frame).

    > THANKS very MUCH!!!


    Your lack of future SHOUTING will be thanks enough.

    Andrew T.
     
    Andrew Thompson, Nov 2, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. lucky

    swing JFrame problem

    lucky, Aug 17, 2003, in forum: Java
    Replies:
    3
    Views:
    596
    =?ISO-8859-1?Q?Andree_Gro=DFe?=
    Aug 18, 2003
  2. Passero

    Strange problem with a JFrame

    Passero, Dec 19, 2003, in forum: Java
    Replies:
    8
    Views:
    492
    Tony Morris
    Jan 14, 2004
  3. James
    Replies:
    1
    Views:
    794
    Paul Lutus
    Sep 20, 2004
  4. jakester
    Replies:
    3
    Views:
    1,833
    jakester
    Apr 3, 2007
  5. Replies:
    2
    Views:
    418
    markspace
    Aug 27, 2012
Loading...

Share This Page