Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > JFrame problem

Reply
Thread Tools

JFrame problem

 
 
matrix
Guest
Posts: n/a
 
      11-02-2006
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!!!

 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      11-02-2006
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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How Can I Get One JFrame To Appear Above Another JFrame clusardi2k@aol.com Java 2 08-27-2012 03:01 PM
start a new JFrame from an existing one, and when old JFrame closes new one does not jakester Java 3 04-02-2007 11:13 PM
about resizeable problem in JFrame/JDialog!!! James Java 1 09-20-2004 04:17 PM
Strange problem with a JFrame Passero Java 8 01-14-2004 10:42 PM
swing JFrame problem lucky Java 3 08-18-2003 07:23 AM



Advertisments