Skip to main content



      Home
Home » Archived » Visual Editor (VE) » Displaying a JPanel sublass in VE
Displaying a JPanel sublass in VE [message #16080] Thu, 22 January 2004 06:03 Go to next message
Eclipse UserFriend
Originally posted by: magnus.fagerqvist.lm.se

Hello!

I have a class (C1) which extends JPanel. This class is in turn extended by
another class (C2) which then also
should be a JPanel. I'm having trouble to visually display the properties of
the C2 class in VE (especially the
ones that are set in class C1's initialize method). The class structure
looks like this.

public class C1 extends JPanel {
public C1() {
initialize();
}

// bla..bla..bla
}

public class C2 extends C1 {
public C2() {
super();
initialize();
}

// bla...bla...bla
}

regards
/magnus
Re: Displaying a JPanel sublass in VE [message #16093 is a reply to message #16080] Thu, 22 January 2004 08:11 Go to previous messageGo to next message
Eclipse UserFriend
Magnus,
When you say "I'm having trouble to visually display the properties of the
C2 class in VE", do you mean the properties don't show up in the property
sheet viewer? If this is the case you may have problem if you have defined a
beaninfo class for C1 and C2. In each beaninfo class you must provide a
getAdditionalBeanInfo method that returns your super's beaninfo. Something
like this:
public BeanInfo[] getAdditionalBeanInfo(){

try {

return new BeanInfo[] {

Introspector.getBeanInfo(getBeanClass().getSuperclass())

};

} catch (IntrospectionException e) {

return new BeanInfo[0];

}

}

If you don't have beaninfo, it must be another problem. Perhaps you can
attach your source code and I can try to recreate the problem.

Regards...
Peter Walker

"Magnus Fagerqvist" <magnus.fagerqvist@lm.se> wrote in message
news:buoanl$fp5$1@eclipse.org...
> Hello!
>
> I have a class (C1) which extends JPanel. This class is in turn extended
by
> another class (C2) which then also
> should be a JPanel. I'm having trouble to visually display the properties
of
> the C2 class in VE (especially the
> ones that are set in class C1's initialize method). The class structure
> looks like this.
>
> public class C1 extends JPanel {
> public C1() {
> initialize();
> }
>
> // bla..bla..bla
> }
>
> public class C2 extends C1 {
> public C2() {
> super();
> initialize();
> }
>
> // bla...bla...bla
> }
>
> regards
> /magnus
>
>
Re: Displaying a JPanel sublass in VE [message #16502 is a reply to message #16080] Thu, 22 January 2004 17:42 Go to previous message
Eclipse UserFriend
Hi Magnus,

Hi Magnus,

Is C1 abstract ? Does the problem become fixed if you remove the abstract
keyword ?

Best regards,

Joe
Re: Displaying a JPanel sublass in VE [message #578974 is a reply to message #16080] Thu, 22 January 2004 08:11 Go to previous message
Eclipse UserFriend
Magnus,
When you say "I'm having trouble to visually display the properties of the
C2 class in VE", do you mean the properties don't show up in the property
sheet viewer? If this is the case you may have problem if you have defined a
beaninfo class for C1 and C2. In each beaninfo class you must provide a
getAdditionalBeanInfo method that returns your super's beaninfo. Something
like this:
public BeanInfo[] getAdditionalBeanInfo(){

try {

return new BeanInfo[] {

Introspector.getBeanInfo(getBeanClass().getSuperclass())

};

} catch (IntrospectionException e) {

return new BeanInfo[0];

}

}

If you don't have beaninfo, it must be another problem. Perhaps you can
attach your source code and I can try to recreate the problem.

Regards...
Peter Walker

"Magnus Fagerqvist" <magnus.fagerqvist@lm.se> wrote in message
news:buoanl$fp5$1@eclipse.org...
> Hello!
>
> I have a class (C1) which extends JPanel. This class is in turn extended
by
> another class (C2) which then also
> should be a JPanel. I'm having trouble to visually display the properties
of
> the C2 class in VE (especially the
> ones that are set in class C1's initialize method). The class structure
> looks like this.
>
> public class C1 extends JPanel {
> public C1() {
> initialize();
> }
>
> // bla..bla..bla
> }
>
> public class C2 extends C1 {
> public C2() {
> super();
> initialize();
> }
>
> // bla...bla...bla
> }
>
> regards
> /magnus
>
>
Re: Displaying a JPanel sublass in VE [message #579187 is a reply to message #16080] Thu, 22 January 2004 17:42 Go to previous message
Eclipse UserFriend
Hi Magnus,

Hi Magnus,

Is C1 abstract ? Does the problem become fixed if you remove the abstract
keyword ?

Best regards,

Joe
Previous Topic:Pb with this keyword.
Next Topic:Too complicated to be evaluated
Goto Forum:
  


Current Time: Tue Jun 03 00:45:32 EDT 2025

Powered by FUDForum. Page generated in 0.25210 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top