Path: csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail From: "Rexx Magnus" Subject: Window close & non-resiza Message-ID: X-Comment-To: comp.lang.java.gui Newsgroups: comp.lang.java.gui Content-Type: text/plain; charset=IBM437 Content-Transfer-Encoding: 8bit X-Gateway: time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92] Lines: 86 Date: Wed, 27 Apr 2011 15:47:37 GMT NNTP-Posting-Host: 96.60.20.240 X-Complaints-To: news@tds.net X-Trace: newsreading01.news.tds.net 1303919257 96.60.20.240 (Wed, 27 Apr 2011 10:47:37 CDT) NNTP-Posting-Date: Wed, 27 Apr 2011 10:47:37 CDT Organization: TDS.net Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.gui:3906 To: comp.lang.java.gui I've been hunting on google rather fruitlessly, trying to find out how to make a window non-resizable after creating a desktop application in Netbeans 6.1. The properties dialog for the frame don't have one that refers to the resizable property, so that's no use. I'm not sure how or where to put code to set it to non-resizable (if it's possible) I'm also trying to find out how to catch the Window Close event so that I can save my settings to a file. I can't find an events menu option that refers to it. The code that usually comes up for a GUI is something like: ------------------- public class DesktopApplication1View extends FrameView { public DesktopApplication1View(SingleFrameApplication app) { super(app); initComponents(); //status bar code etc. (don't use this) } //about box code here - something else I don't use //along with all the other gui generated code. } ------------------- Then you've got the code that actually calls the applicationview: ------------------- package desktopapplication1; import org.jdesktop.application.Application; import org.jdesktop.application.SingleFrameApplication; /** * The main class of the application. */ public class DesktopApplication1 extends SingleFrameApplication { /** * At startup create and show the main frame of the application. */ @Override protected void startup() { show(new DesktopApplication1View(this)); } /** * This method is to initialize the specified window by injecting resources. * Windows shown in our application come fully initialized from the GUI * builder, so this additional configuration is not needed. */ @Override protected void configureWindow(java.awt.Window root) { } /** * A convenient static getter for the application instance. * @return the instance of DesktopApplication1 */ public static DesktopApplication1 getApplication() { return Application.getInstance(DesktopApplication1.class); } /** * Main method launching the application. */ public static void main(String[] args) { launch(DesktopApplication1.class, args); } } ----------------- Obviously my application has all of the code it needs and is working, except for the irritating fact that the window is resizable (and needs to act more like a dialog or tool, rather than an editor window!) and I'm unable to catch the close event so that I can save my data. Any help would be appreciated! --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24