Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ScrolledComposite Inheritance Problem

843785Sep 12 2008 — edited Sep 12 2008
import org.eclipse.swt.internal.SWTEventListener;
import org.eclipse.swt.custom.ScrolledComposite;

public abstract class DataEntryPanel extends ScrolledComposite {
public DataEntryPanel(Composite parent, int style){
this (parent, style);
}
}

I am trying to setup multiple scrollable panels based off of the ScrolledComposite class. I kept getting "constructor must be explicitly invoked" errors, so I added the code above. I'm guessing that this is calling the DataEntryPanel constructor, which is why I am getting "recursive constructor invocation"

I tried using super instead of this, but it said super(Composite, int) wasn't defined (although that is the constructor listed on the SWT wiki).

I know I'm doing something stupid here, but I need a bail out. After searching multiple forums I have found more info about working around inheritance than actually utilizing it (which imported code). Problem is I don't know Java well enough...
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 10 2008
Added on Sep 12 2008
3 comments
147 views