JFrame problem

M

matrix

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!!!
 
A

Andrew Thompson

Sub: JFrame problem

Note that:
- comp.lang.java.gui is specialised for GUI matters.
- 'JFrame close/maximize' might have been a better title
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..
***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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,040
Latest member
papereejit

Latest Threads

Top