🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #9518

Strange effects of LaF change on JInternalFrame

#9518
From: paul turner
Date: Tue, 07 Mar 2000 00:00
39 lines
2033 bytes
i'm using JDK1.2.2, NT4 sp5

The problem that i'd appreciate some help on is:

Creating a JInternalFrame with the constructor: new JInternalFrame(String
title, boolean resizeable, boolean closeable, boolean maximizable, boolean
iconifiable )

with the default metal LaF works fine . . .the buttons do not appear on the
title bar as expected.

However, when the LaF is changed to CDE/motif or Windows, the title bar
buttons appear and work.  I know I can override these close events, but
wondered why the
buttons appear when I don't want them to.

here's how I change the LaF

        public void setLaF() {
            try {
             UIManager.setLookAndFeel(laFClassName);
                Runnable runnable = new Runnable() {
            public void run() {
                  SwingUtilities.updateComponentTreeUI(--Top level
Container--);
                    }
               };
                SwingUtilities.invokeLater(runnable);
            }
            catch (UnsupportedLookAndFeelException
ulafe){System.out.println(ulafe);}
            catch (IllegalAccessException iae) {System.out.println(iae);}
            catch (InstantiationException ie2) {System.out.println(ie);}
            catch (ClassNotFoundException cnfe) {System.out.println(cnfe);}
        }

any ideas . . .?

thanks in advance Paul Turner
Technical Details
Message-ID: <952429456.12807.0.nnrp-03.c1c3e1ec@news.demon.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,de8a9e1762c4a09,start
X-Google-Attributes: gid111d45,public
From: "paul turner" <pturner@demon.net>
Subject: Strange effects of LaF change on JInternalFrame
Date: 2000/03/07
Message-ID: <952429456.12807.0.nnrp-03.c1c3e1ec@news.demon.co.uk>
X-Deja-AN: 594220331
X-NNTP-Posting-Host: pturner.eng.demon.net:193.195.225.236
X-Trace: news.demon.co.uk 952429456 nnrp-03:12807 NO-IDENT pturner.eng.demon.net:193.195.225.236
X-MSMail-Priority: Normal
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
Newsgroups: borland.public.jbuilder.java.swing
X-Complaints-To: abuse@demon.net