VE confuses SWT with AWT [message #70180] |
Sat, 06 November 2004 03:26  |
Eclipse User |
|
|
|
Originally posted by: jens.albrecht.gmx.net
Hi,
here is my problem:
Created a new 'Visual Class' with style 'SWT Application'.
Opened it in Visual Editor and a nice empty shell shows up.
First strange thing - Moving the mouse over the shell shows a message
'java.lang.IllegalArgumentException (Object is not an instance of =
declaring class)'
Doesn't mean much to me, so I ignore it. I select 'Button' from the 'SWT=
=
Controls' section on the palette and insert one on the shell.
The generated code references the correct SWT packages, but in the =
properties page for the button the entries rather correspond to an =
AWT-Button. E.g. there is 'Label' instead of 'Text'.
All in all I have the feeling that VE is somewhat undecided if I'm doing=
=
AWT or SWT.
Any idea what's going wrong?
Thanks
Jens
|
|
|
|
Re: VE confuses SWT with AWT [message #70220 is a reply to message #70202] |
Sat, 06 November 2004 15:53  |
Eclipse User |
|
|
|
Originally posted by: jens.albrecht.gmx.net
Hi Jeff,
it's cured. I need to have different Java versions on my machine but =
thought it would be enough to put 1.4.2 first in my path before starting=
=
eclipse. However, when I checked the project build path I indeed found a=
=
reference to an earlier jre.
Thanks for the quick help!
Jens
On Sat, 06 Nov 2004 10:08:53 -0500, Jeff Myers <myersj@nospam.gmail.com>=
=
wrote:
> Jens Albrecht wrote:
>> Hi,
>> here is my problem:
>> Created a new 'Visual Class' with style 'SWT Application'.
>> Opened it in Visual Editor and a nice empty shell shows up.
>> First strange thing - Moving the mouse over the shell shows a message=
>> 'java.lang.IllegalArgumentException (Object is not an instance of =
>> declaring class)'
>> Doesn't mean much to me, so I ignore it. I select 'Button' from the =
=
>> 'SWT Controls' section on the palette and insert one on the shell.
>> The generated code references the correct SWT packages, but in the =
>> properties page for the button the entries rather correspond to an =
>> AWT-Button. E.g. there is 'Label' instead of 'Text'.
>> All in all I have the feeling that VE is somewhat undecided if I'm =
>> doing AWT or SWT.
>> Any idea what's going wrong?
>> Thanks
>> Jens
> Hi Jens,
>
> You must run a JRE 1.4.2 or higher when working with SWT. Prior to th=
at =
> there was a bug in Sun's bean info implementation that makes it use th=
e =
> first bean info for a class with the name it finds, regardless of =
> whether it is in the correct package. So it uses the bean info for =
> java.awt.Button when it should be using the bean info for =
> org.eclipse.swt.widgets.Button.
>
> So basically, you need to be using Java 1.4.2.
>
> - Jeff
|
|
|
Re: VE confuses SWT with AWT [message #602667 is a reply to message #70180] |
Sat, 06 November 2004 10:08  |
Eclipse User |
|
|
|
Jens Albrecht wrote:
> Hi,
>
> here is my problem:
>
> Created a new 'Visual Class' with style 'SWT Application'.
> Opened it in Visual Editor and a nice empty shell shows up.
> First strange thing - Moving the mouse over the shell shows a message
> 'java.lang.IllegalArgumentException (Object is not an instance of
> declaring class)'
>
> Doesn't mean much to me, so I ignore it. I select 'Button' from the
> 'SWT Controls' section on the palette and insert one on the shell.
> The generated code references the correct SWT packages, but in the
> properties page for the button the entries rather correspond to an
> AWT-Button. E.g. there is 'Label' instead of 'Text'.
>
> All in all I have the feeling that VE is somewhat undecided if I'm
> doing AWT or SWT.
>
> Any idea what's going wrong?
>
> Thanks
> Jens
Hi Jens,
You must run a JRE 1.4.2 or higher when working with SWT. Prior to that
there was a bug in Sun's bean info implementation that makes it use the
first bean info for a class with the name it finds, regardless of
whether it is in the correct package. So it uses the bean info for
java.awt.Button when it should be using the bean info for
org.eclipse.swt.widgets.Button.
So basically, you need to be using Java 1.4.2.
- Jeff
|
|
|
Re: VE confuses SWT with AWT [message #602675 is a reply to message #70202] |
Sat, 06 November 2004 15:53  |
Eclipse User |
|
|
|
Originally posted by: jens.albrecht.gmx.net
Hi Jeff,
it's cured. I need to have different Java versions on my machine but =
thought it would be enough to put 1.4.2 first in my path before starting=
=
eclipse. However, when I checked the project build path I indeed found a=
=
reference to an earlier jre.
Thanks for the quick help!
Jens
On Sat, 06 Nov 2004 10:08:53 -0500, Jeff Myers <myersj@nospam.gmail.com>=
=
wrote:
> Jens Albrecht wrote:
>> Hi,
>> here is my problem:
>> Created a new 'Visual Class' with style 'SWT Application'.
>> Opened it in Visual Editor and a nice empty shell shows up.
>> First strange thing - Moving the mouse over the shell shows a message=
>> 'java.lang.IllegalArgumentException (Object is not an instance of =
>> declaring class)'
>> Doesn't mean much to me, so I ignore it. I select 'Button' from the =
=
>> 'SWT Controls' section on the palette and insert one on the shell.
>> The generated code references the correct SWT packages, but in the =
>> properties page for the button the entries rather correspond to an =
>> AWT-Button. E.g. there is 'Label' instead of 'Text'.
>> All in all I have the feeling that VE is somewhat undecided if I'm =
>> doing AWT or SWT.
>> Any idea what's going wrong?
>> Thanks
>> Jens
> Hi Jens,
>
> You must run a JRE 1.4.2 or higher when working with SWT. Prior to th=
at =
> there was a bug in Sun's bean info implementation that makes it use th=
e =
> first bean info for a class with the name it finds, regardless of =
> whether it is in the correct package. So it uses the bean info for =
> java.awt.Button when it should be using the bean info for =
> org.eclipse.swt.widgets.Button.
>
> So basically, you need to be using Java 1.4.2.
>
> - Jeff
|
|
|
Powered by
FUDForum. Page generated in 0.03684 seconds