🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #16330

Re: Iconize/Resize/Close JFrame?

#16330
From: Max Polk
Date: Thu, 11 Mar 1999 00:00
26 lines
1646 bytes
In article <7c4lla$i2d2@forums.borland.com>,
mjchoi@star.dwt.co.kr says...
> I want to activate only Iconize('-') and Close('x') buttons in
> a Jframe, with a resizable button inactivated.  If I use
> 'frame.setResizable(false)' method in Jframe, it is appeared
> only a 'x' button.  Then, how can I activate Iconize('-')
> button in the frame?

You can't do that.  It's impossible.

> Another Question: When I click a Close button in the Jframe, I
> want to popup a dialog box before the frame is automatically
> exited by the close button.  How can I do that?

Use the setDefaultCloseOperation() method and use the option that
says to not do anything.  Set up a window listener and when you
get the windowClosing event, pop up your dialog box.
 
> Last Question: How can I resize a frame including inner
> components?  (i.e., button, panel, etc. in the frame)

The layout managers like FlowLayout and BoxLayout won't resize
internal components when the container size changes.  Layout
managers like BorderLayout and GridLayout force components to
take up the entire size of each cell or border area, so when the
container size changes, each component inside changes.
Technical Details
Message-ID: <MPG.115119a8d29cf63c9896c7@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7c4lla$i2d2@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,b648668d8364ad6a
X-Google-Attributes: gidf74b3,public
From: none@none.invalid (Max Polk)
Subject: Re: Iconize/Resize/Close JFrame?
Date: 1999/03/11
Message-ID: <MPG.115119a8d29cf63c9896c7@forums.borland.com>
X-Deja-AN: 453674510
References: <7c4lla$i2d2@forums.borland.com>
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.jbuilder.java.language