Results 1 to 2 of 2
  1. #1
    srinivasa_v is offline Member
    Join Date
    May 2007
    Posts
    1
    Rep Power
    0

    Default New Instance for SWT

    Hi

    I am getting Instantiation exception:

    In my java class i have the code like "runnerClass.newInstance()"

    here runnerClass is "SWTRunner". But in my SWTRunner class it is expecting two arguments. There is no default constructor available.

    How can i create a instance ? Where i need to write the code, in my class or SWT class? If you need more detail plz reply back.


    Below is SWT code:

    public class SWTRunner extends org.eclipse.swt.widgets.Composite {

    public SWTRunner(Composite parent, int style) {
    super(parent, style);
    // TODO Auto-generated constructor stub
    }
    -----
    }

    Thanks in advance

  2. #2
    goldhouse is offline Senior Member
    Join Date
    Mar 2007
    Posts
    134
    Rep Power
    0

Similar Threads

  1. Create different instance of a tablemodel
    By Bill in forum AWT / Swing
    Replies: 6
    Last Post: 03-27-2008, 03:49 PM
  2. Instantiation using an instance factory method
    By JavaBean in forum Java Tip
    Replies: 0
    Last Post: 09-26-2007, 08:25 PM
  3. passing an array into an instance
    By lockmac in forum New To Java
    Replies: 1
    Last Post: 08-08-2007, 09:35 AM
  4. problems with Instance Data
    By paty in forum New To Java
    Replies: 2
    Last Post: 08-02-2007, 05:45 PM
  5. Instance variable
    By Jack in forum New To Java
    Replies: 2
    Last Post: 07-04-2007, 04:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •