Article View: borland.public.jbuilder.java.swing
Article #1229Re: JB 9 designer help
From: Gillmer J. Derge (TeamB)
Date: Tue, 24 Feb 2004 16:14
Date: Tue, 24 Feb 2004 16:14
34 lines
2205 bytes
2205 bytes
Sven Goetgeluck wrote:
> when opening my dialog in designer i'll get following error
> java.lang.IllegalAccessException: Class com.borland.jbuilder.cmt.jb.JbValue
> can not access a member of class vrex4.MyScrollPane with modifiers "public"
> new MyScrollPane()
>
> anybody has an idea what it means??
I suspect that your dialog contains a member of type vrex4.MyScrollPane.
Something like:
public class MyDialog extends JDialog {
private vrex4.MyScrollPane myScrollPane;
// ...
}
In order to let you manipulate the "myScrollPane" member, the designer
is trying to create an instance of vrex4.MyScrollPane. It does that
using the no-argument constructor as in "new MyScrollPane()." Since
your class doesn't have a no-argument constructor, that's failing.
If you want this class to work in the designer you need to implement a
no-argument constructor. If you want to make sure it's never used in an
actual program, you can do something like this:
public MyScrollPane() {
if (!Beans.isDesignTime()) {
throw new UnsupportedOperationException();
}
// ...
}
--
Gillmer J. Derge (TeamB)
Technical Details
Message-ID:
<403b7844$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<403b7615$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,585e9cb8fb2f0dbd X-Google-Attributes: gid111d45,public X-Google-ArrivalTime: 2004-02-24 08:22:48 PST Date: Tue, 24 Feb 2004 11:14:02 -0500 From: "Gillmer J. Derge (TeamB)" <spam@gillmerderge.com> User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing Subject: Re: JB 9 designer help References: <403b7615$1@newsgroups.borland.com> In-Reply-To: <403b7615$1@newsgroups.borland.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 64.185.133.13 Message-ID: <403b7844$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1077639236 64.185.133.13 (24 Feb 2004 08:13:56 -0800) Lines: 34 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail