Need help with an internal error issue [message #869720] |
Fri, 04 May 2012 00:11  |
Eclipse User |
|
|
|
Hello - I am attempting to bring in some code into WindowBuilder that I
wrote a while ago, using Visual Editor and Swing. This code is designed
to function either as an applet or a web start application. The class I
wrote extends JApplet and also implements an interface for
FloatableApplets. This allows the applet to "float" off a web browser
and work in a stand-alone JFrame, (in response to a user clicking on a
button within the applet). Anywise, that is some background, though not
directly relevant to the issue I am having with WindowBuilder.
It appears that WindowBuilder is having troubles with the JApplet type,
when it has been extended to implement an additional interface. I am
getting an internal error reporting "java.lang.IllegalArgumentException:
argument type mismatch" I have attached (hope that works for this
newsgroup) the generated report.zip file which includes a boiled down
test case with supporting code that should allow one to reproduce the
error and look at the stack walkback.
Maybe I am doing something dumb, and just can't see it, but hopefully
some wonderful guru will take a look at it and guide me back to the
light? Start with the class - TelescopeControlPaddle and you should be
able to rapidly grok the code and situation. Thanks in advance... Marc..
P.S. I think most of the plug-in version info will also be found in the
attached report....
Eclipse Version: Indigo Service Release 2
Build id: 20120216-1857
|
|
|
Re: Need help with an internal error issue [message #869927 is a reply to message #869720] |
Fri, 04 May 2012 20:35   |
Eclipse User |
|
|
|
The problem here is that your custom Swing component, TestJFloatPanel, is not a valid JavaBean as it does not have a default constructor. Add the missing default constructor and it works fine...
public TestJFloatPanel() {
// Set up the panel-inside-a-panel structure; we start off
// unfloated
setLayout(new BorderLayout());
}
|
|
|
Re: Need help with an internal error issue. SOLVED! [message #870051 is a reply to message #869927] |
Sun, 06 May 2012 03:23  |
Eclipse User |
|
|
|
On 5/4/2012 1:35 PM, Eric Clayberg wrote:
> The problem here is that your custom Swing component, TestJFloatPanel,
> is not a valid JavaBean as it does not have a default constructor. Add
> the missing default constructor and it works fine...
>
> public TestJFloatPanel() {
> // Set up the panel-inside-a-panel structure; we start off
> // unfloated
> setLayout(new BorderLayout());
> }
Thanks a million Eric, it appears you got me pointed in the right
direction at least! I guess I didn't realize that when you subclass a
Swing component, it has to adhere to the requirements of being a
JavaBean as well. I tend to avoid beans because of the requirement for a
default constructor, when I am coding, I get queasy about the fact that
an object can be in an invalid state between instantiation time and
initialization. Anywise, I figured it must have been something simple
that I was overlooking.. :-(
So appears the WindowBuilder is a happy camper for the moment, but since
I am attempting to resurrect some pretty old Java code, built back in
04, may hit a few more hiccups along the way... Again thanks a lot,
really appreciate it...
Marc...
|
|
|
Powered by
FUDForum. Page generated in 0.12345 seconds