🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: the red component mistery

#1198
From: Greg Hamer
Date: Sat, 07 Feb 2004 01:18
18 lines
1730 bytes
"Paul Furbacher" <pfurbacher@mac.com> wrote in message news:401995d7
...
> To get around this with dialogs, one typically designs
> the components (sub-panels) of a dialog as separate
> classes (extensions of JPanel) and uses those
> in a new JDialog.  That is, one doesn't subclass
> JDialog.  ...

Or just be sure that you provide a no-argument public constructor to your
subclass of JDialog to appease the designer(in addition to making the class
public). Your code does not have to use it, but the Designer will. If you
want, you can put code in the no-argument constuctor so that it throws an
exception if  it is ever called outside of the designer.

if (!java.beans.Beans.isDesignTime())
           throw new RuntimeException("Do no use this constuctor");

 to make sure that it is never used in real life.
Technical Details
Message-ID: <40243cd2$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!newsgroups.borland.com!not-for-mail
References: <4019791d$1@newsgroups.borland.com> <401995d7$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,13c33929f7fcff3b
X-Google-Attributes: gid111d45,public
X-Google-ArrivalTime: 2004-02-06 17:28:06 PST
From: "Greg Hamer" <ghamer@dslextreme.com>
Newsgroups: borland.public.jbuilder.java.swing
References: <4019791d$1@newsgroups.borland.com> <401995d7$1@newsgroups.borland.com>
Subject: Re: the red component mistery
Date: Fri, 6 Feb 2004 17:18:40 -0800
Lines: 21
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 24.52.242.126
Message-ID: <40243cd2$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1076116690 24.52.242.126 (6 Feb 2004 17:18:10 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!newsgroups.borland.com!not-for-mail