Object with argument constructor in ATG

HI guys
Is it possible to craete an object with argument constructor with component in atg
if it is possible give me an example

With ATG 10.0.3 and later, you can use an $instanceFactory to create objects with constructor objects or create a Nucleus component from factory (either a static class method, or a method of another Nucleus component).
Documentation (and an example) are here: http://docs.oracle.com/cd/E36434_01/Platform.10-1-2/ATGPlatformProgGuide/html/s0208parameterconstructorinstancefact01.html

Similar Messages

  • Why Do We Need Constructor With Arguments?

    I understand that constructor is used to create instances.
    We can have constructors with 0 argument or with one/multiple arguments. Why do we need a contructor with arguments? What is the purpose of doing it?
    Thank you for your help.

    There are three general ways to provide constructors, like you said:
    1) Default constructor (no arguments)
    2) One or more constructors with arguments
    3) One or more constructors with arguments as well as a default constructor
    From a design standpoint, the idea is to give as much information needed for constructing an object up front. Look at the standard Java API for some examples (and because I couldn't find a standard class with just a default constructor, one made up):
    public class Foo {
      private long createTime;
      public Foo() {
        createTime = System.currentTimeMillis();
      public String toString() {
        return "This object was created at " + createTime;
    }This code has no reason to take any arguments. It does all construction on its own and already has all the information it needs. On the other hand, look at BufferedReader. There's no possible way this object can ever be constructed without an argument. What's it buffering? It doesn't make sense to ever instantiate new BufferedReader(). It'd be useless. So BufferedReader has no default (no-arg) constructor.
    Sometimes (very often in Java) you want to do both. Let something be instantiated with no arguments, but also provide the option of creating something with more specific details. A good example is ArrayList, which has three constructors:
    public ArrayList() --> Construct an empty ArrayList with the default initial capacity;
    public ArrayList(Collection c) --> Construct an ArrayList populated with the contents of another collection;
    public ArrayList(int capacity) --> Construct an empty ArrayList with a specific initial capacity.
    Sometimes it makes sense just to use the default. Sometimes you want more control over the behavior. Those are the times to use multiple constructors.
    Hope this helps!

  • Dynamic constructor call with arguments

    hey all i am quite new to this dynamic creation stuff
    basically i have an array of class literals i.e One.class Two.class Three.class
    etc
    i then loop through this array using the isInstance() method to find the objects correct type
    when i find this type i want to then create an object of this type with arguments passed to the constructor
    i know there is a way to create the object using a defualt non arg constructor call using newInstance()...
    so to repeat is there a way to dynamically create an object while passing arguments to the constructor?
    thanx rob

    Call getContstructor() on the class passing it an array of argument types. Then call newInstance() on the Constructor object that gets returned passing it an array of the arguments.

  • Create an object with the name passed in as a string argument to a method

    Hi,
    I am sorry if it's too trivial for this forum , but I am stuck with the following requirements.
    I have a method
    void abc(String object_name, String key, String value)
    method abc should first check if there exists in memory a hashmap object with the name passed in as argument object_name.
    If yes ..just put the key and value there.
    if not , then create the hashmap object called <object_name> and insert the key/value there.
    Can anybody help me in the first step i.e, how to check if an object exists with the name passed in and if not then create it.
    Will getInstance method be of any help?
    Thanks in advance for your response.
    -Sub-java

    Dear Cotton.m,
    Thanks for your suggesstion. I will remember that.
    But somehow I have a strong belief that you still need to consult dictionary for exact meaning of the words like "upset" , "frustration" etc. Not knowing something in a language , that too as a beginner, does not yield frustration, but increases curiosity. And people like petes1234 are there to diminish that appetite.
    To clarify above, let me compare jverd's reply to my doubt with petes1234's.
    jverd said it cannot be done and suggested a work around (It was perfect and worked for me) While petes1234 , having no work in hand probably, started analysis of newbies mistakes.
    jverd solved my problem by saying that it cannot be done. petes1234 acted as a worthless critic in my opinion and now joined cotton.m.
    Finally, this is a java forum and I do not want to discuss human characteristics here for sure.
    My apologies if I had a wrong concept or if I chose a wrong forum to ask, where people like petes1234 or Cotton.m show their geekdom by pointing out "shortfalls" rather than clearing that by perfect examples and words.
    Again take it easy and Cotton.m , please do not use this forum to figure out others' frustration but be a little more focussed on solving others "Java related" problems :)
    -Sub-java

  • Problems with java constructor: "inconsistent data types" in SQL query

    Hi,
    I tried to define a type "point3d" with some member functions, implemented in java, in my database. Therefor I implemented a class Point3dj.java as you can see it below and loaded it with "loadjava -user ... -resolve -verbose Point3dj.java" into the database.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    package spatial.objects;
    import java.sql.*;
    public class Point3dj implements java.sql.SQLData {
    public double x;
    public double y;
    public double z;
    public void readSQL(SQLInput in, String type)
    throws SQLException {
    x = in.readDouble();
    y = in.readDouble();
    z = in.readDouble();
    public void writeSQL(SQLOutput out)
    throws SQLException {
    out.writeDouble(x);
    out.writeDouble(y);
    out.writeDouble(z);
    public String getSQLTypeName() throws SQLException {
    return "Point3dj";
    public Point3dj(double x, double y, double z)
    this.x = x;
    this.y = y;
    this.z = z;
    public static Point3dj create(double x, double y, double z)
    return new Point3dj(x,y,z);
    public double getNumber()
         return Math.sqrt(this.x*this.x + this.y*this.y + this.z*this.z);
    public static double getStaticNumber(double px, double py, double pz)
         return Math.sqrt(px*px+py*py+pz*pz);
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Additionally, I created the corresponding type in SQL by
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    CREATE OR REPLACE TYPE point3dj AS OBJECT EXTERNAL NAME
    'spatial.objects.Point3dj' LANGUAGE JAVA USING SQLDATA (
    x FLOAT EXTERNAL NAME 'x',
    y FLOAT EXTERNAL NAME 'y',
    z FLOAT EXTERNAL NAME 'z',
    MEMBER FUNCTION getNumber RETURN FLOAT
    EXTERNAL NAME 'getNumber() return double',
    STATIC FUNCTION getStaticNumber(xp FLOAT, yp FLOAT, zp FLOAT) RETURN FLOAT
    EXTERNAL NAME 'getStaticNumber(double, double, double) return double')
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    After that I tried some SQL commands:
    create table pointsj of point3dj;
    insert into pointsj values (point3dj(2,1,1));
    SELECT x, a.getnumber() FROM pointsj a;Now, the problem:
    Everything works fine, if I delete the constructor
    public Point3dj(double x, double y, double z)
    this.x = x;
    this.y = y;
    this.z = z;
    in the java class, or if I replace it with a constructor that has no input arguments.
    But with this few code lines in the java file, I get an error when executing the SQL command
    SELECT x, a.getnumber() FROM pointsj a;The Error is:
    "ORA-00932: inconsistent data types: an IN argument at position 1 that is an instance of an Oracle type convertible to an instance of a user defined Java class expected, an Oracle type that could not be converted to a java class received"
    I think, there are some problems with the input argument of the constructor, but why? I don't need the constructor in SQL, but it is used by a routine of another java class, so I can't just delete it.
    Can anybody help me? I would be very glad about that since I already tried a lot and also search in forums and so on, but wasn't successful up to new.
    Thanks!

    Dear Avi,
    This makes sense when it is a short code sample (and i think i've done that across various posts), but sometime this is too long to copy/paste, in these cases, i refer to the freely available code samples, as i did above on this forum; here is the quote.
    Look at examples of VARRAY and Nested TABLES of scalar types in the code samples of my book (chapter 8) http://books.elsevier.com/us//digitalpress/us/subindex.asp?maintarget=companions/defaultindividual.asp&isbn=9781555583293&country=United+States&srccode=&ref=&subcode=&head=&pdf=&basiccode=&txtSearch=&SearchField=&operator=&order=&community=digitalpress
    As you can see, i was not even asking people to buy the book, just telling them where to grab the code samples.
    I appreciate your input on this and as always, your contribution to the forum, Kuassi

  • View Object with User Defined Type input

    I am trying to use a View Object with a query that requires a user defined object as an input parameter.
    I have the query working with a PreparedStatement, but would like to use a View Object.
    When I use the PreparedStatement, I prepare the user defined type data like this:
    // get the data into an object array
    Object[] wSRecObjArr = wSRec.getObjectArray();
    // set up rec descriptor
    StructDescriptor WSRecDescriptor = StructDescriptor.createDescriptor("WS_REC",conn);
    // populate the record struct
    STRUCT wSRecStruct = new STRUCT(WSRecDescriptor,conn,wSRecObjArr);
    Then I can use this in the PreparedStatement like this:
    OraclePreparedStatement stat = null;
    ResultSet rs = null;
    stat = (OraclePreparedStatement)conn.prepareStatement("Select test_pkg.test_function(?) FROM DUAL");
    stat.setSTRUCT(1, wSRecStruct);
    rs = stat.executeQuery();
    I would like to do the same process with a View Object instead of the PreparedStatement.
    My question is "How do I create the input objects"?
    I obtain the View Object from the Application Module using findViewObject(). I don't actually have a connection object to pass into the StructDescriptor.createDescriptor method.
    I have tried just using Java Object Arrays (Object[]) to pass the data, but that gave an error:
    oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation.
    Any help or pointers are greatly appreciated.
    Thank you.
    Edited by: 942120 on May 1, 2013 8:45 AM
    Edited by: 942120 on May 1, 2013 8:46 AM
    Edited by: 942120 on May 1, 2013 9:05 AM
    Edited by: 942120 on May 1, 2013 9:06 AM

    Custom domains are the way to go.
    When I try to pass custom domains that represent my user defined types - it works.
    However, one of the functions requires a table of a user defined type be passed in.
    I tried creating a domain of the table type. It forces me to add a field during creation (in JDEV), so I tried adding a field of type Array of Element of the domain representing the user defined type.
    I populate the table by setting the field I created, but the table is empty in PL/SQL (TEST_TAB.COUNT = 0).
    I also tried passing the oracle.jbo.domain.Array object, but that produced an error:
    java.sql.SQLException: ORA-06553: PLS-306: wrong number or types of arguments in call
    I also tried passing Object[], but that produced an error:
    oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation.
    How do I properly create, and pass an domain that represents a table of a user defined type?
    When I use a OraclePreparedStatement, I can pass a oracle.sql.ARRAY using stat.setARRAY.
    Thank you for the help you have provided, and any future advice.
    JDEV 10.1.2.3
    JDBC 10.2.0.5
    Edited by: 942120 on May 13, 2013 7:13 AM
    Edited by: 942120 on May 13, 2013 7:16 AM

  • Prob. Objects with same x,y,z coordinates appear at different positions

    Hello,
    I am having a problem where I have multiple objects with the same x,y,z coordinates but they appear at different positions on the screen. Could this have anything to do with scaling as I scale different types of objects differently. Also, I am using the simple Universe class and the objects that have the problem are added to the Universe when the program is running.
    CB

    I have encoutered this problem in two occaisions. I have ships that fire bullets. When the bullets are created they are not in the same position as the ship that fired them even though they have the same translation vector.
    Here is the constructor for the Bullet--------------------------------
    The transform3D passed in is the transform3D from the ship------------
    public Bullet(Transform3D temp3d, BoundingSphere bounds) {
         // Create the root of the branch graph
         root = new BranchGroup();
    // Create a Transformgroup to scale
    tScale = new TransformGroup();
    tempTrans = new Transform3D();
    tempTrans.setScale(0.2);
    tScale.setTransform(tempTrans);
         //create the main transform and attach the shape
    transRoot = new TransformGroup();
    transRoot.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
         transRoot.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
         transRoot.addChild(new ColorCube(0.4));
    trans3d = new Transform3D(temp3d);
    transRoot.setTransform(trans3d);
         //setup behaviour
    BulletBehaviour myBehavior = new BulletBehaviour(transRoot, trans3d);
    myBehavior.setSchedulingBounds(bounds);
    transRoot.addChild(myBehavior);
         // Connect up graph
         tScale.addChild(transRoot);
         root.addChild(tScale);
         //root.addChild(transRoot);
    root.compile();
    } // end of Cube (constructor)
    The other occaision when I find this problem is when comparing the position of two objects a target and a ship.
    Check out this web page for pictures and debuging output.
    http://www.sfu.ca/~ceden/java3d/snapshots.htm

  • Design Objects with some common attribute/behavior. Is inheritance correct?

    Hi,
    In an application I am working on the domain/business layer has lots of domain objects. many of these domin objects aggregate to form other domain objects. Also in the application we have a class "User" that has the user information and privileges of the logged in "User."
    When updates to the domain object have to be saved to the database we need this user information.
    To make this we have created an AbstractDomainObject that has a private user and get and set methods.
    All (almost all) domain objects in our system will extend from this Abstract DomainObject. So Contract, Shipment and Party all are domain objects and they extend AbstractDomainObject.
    This way we do not need to code the get and set methods for user information in each object and also do not have to pass along the user object separately to the DataAccess layers.
    But I think that this is wrong as we are using inheritance for code-reuse. (I have read about inheritance v/s composition) But it does save lot of code and any new domain object that gets written we have the user information available. (we have lots of domain objects)
    Can somebody suggest what would be a better design with arguments that I could use to influence the other people in the team.
    Thanks,

    But that's easily accomplished through a simpleassociation.
    No it would not. An association is a static
    relationship, That's absolutely incorrect.
    "The association shows the relationship between instances of classes"
    http://pigseye.kennesaw.edu/~dbraun/csis4650/A&D/UML_tutorial/class.htm
    You can Google on UML Association and find many other sites that say the same thing,
    it would have the domain object using
    the same credentials or have some messy code to match
    each users' thead to their credentials.I have no idea what you are on about.
    Why do you need to externalize the
    internal state of the users credentials to dothis?
    To preserve encapsulation.You don't need the memento pattern to do this.
    Avoids the Domain object aquiring multiple
    responsibilities.A simple association also does this.But it doesnt meat the OP's primary requirement.Of course it does. How doesn't it?
    As far as I can tell, the
    OP is just trying to figure out where to storethem.
    If with 'store' you mean which class to holdthem.
    I
    agree.
    Yes. Why does the internale state of the dataneed
    to be externalized?To preserve encapsulation.What do you think externalized means in this context.
    In the Memento Pattern
    externalise means externalise properties fromthe
    object encapsulating them.The point of the Memento Pattern is to externalize
    the internal state of an Object such thatyou
    can keep track of suceessive changes and reverse
    them. Yes.
    That doesn't apply here.The only alternative to externalisation is to violate
    encapsulation and access them directly. You might
    find that acceptable I dont.That's totally false. Unless you can explain how the memento pattern would be used here, I really don't think there is anymore to say. I've looked at the pattern a couple times since we started this discussion and nothing in it suggests it's applicable to this situation.

  • Mock objects calling parent constructor

    I'm trying to create some tests in which I'm providing a mock object to the constructor of my test objects and testing that appropriate methods are called in the mock. The objects I'm mocking only have a few public methods so I created an inner class that extends the object I'm trying to mock and just records which method was called. However, when I run the test it fails because the mock object calls the default constructor of the object of it's parent; causing the entire application to run. I'm trying to figure out a way around this.
    Now I already know a solution that would work, creating a second constructor in the object I'm mocking which does nothing, then call the fake constructor from my mock object instead of the default constructor. The solution dosn't feel very elegent though, I'm wondering if I'm missing a simpler solution?

    dsollen wrote:
    I'm testing JMS communication between two applications. Each topic Listener has a reference to the main class of the respective applications to communicate with them.I still don't see why a call to the constructor should start the program. Change the design so that doesn't happen. You should instead provide a start method.
    Kaj

  • Error creating Objects with Reflection

    This is the code:
    try{
         System.out.println("Restart - test 1 - sub == " + sub);
         c = Class.forName(sub);
         con = c.getDeclaredConstructor();
    catch(NoSuchMethodException e){
         System.out.println("Unknown event type\t" + e);
    }Output:
    Restart - test 1 - sub == Mouse
    Unknown event type     java.lang.NoSuchMethodException: Mouse.<init>()I have a Mouse class with a declared Constructor. Why can't it find the Constructor?

    SquareBox wrote:
    almightywiz wrote:
    Your code is trying to find the default constructor for your Mouse class. If you don't have a default constructor specified, it will throw the exception you encountered. What does your constructor signature look like?
    public Mouse(int weight){
         this.weight = weight;
    }How do I get the Constructor if it contains parameters?This is answered in your other thread: Creating objects with relfections And you even marked it correct!
    Please don't post the same question multiple times. It leads to people wasting their time duplicating each others' answers, and makes for a fractured discussion.
    Edited by: jverd on Apr 26, 2011 3:59 PM

  • Call function with arguments in AS3

    Hello!
    I`m a new in Flex developing, and cannot understand same code
    convention, im Java programmer.
    How I can write correct function call in ActionScript, my
    call: var goodsWnd:CreateGoodsWindow =
    PopUpManager.createPopUp(this,
    CreateGoodsWindow, true) as CreateGoodsWindow;
    I wish call function above with argument, how I do that?
    Where my class: public class CreateGoodsWindow extends
    extends TitleWindow
    public CreateGoodsWindow(data:Object)
    }

    Use PopUpManager.addPopUp() instead of createPopUp().
    addPopUp takes an object that has already been instantiated:
    var createGoodsWindow:CreateGoodsWindow = new
    CreateGoodsWindow(data);
    PopUpManager.addPopUp(createGoodsWindow);

  • Is it posible to create objects with different names dinamically?

    Hi,
    I'm creating an app that manages different wireless nodes in a network and I was thinking that I could create a class called Node which would have a constructor that every time I created an object Node, I would pass the address and some other data about the Node and the constructor will save all that data and also create a unique ID for every Node object.
    Now the problem is that I need to be able to discover all the nodes in my network every time the user clicks a Ping button. So every time the users clicks Ping I need to do a ping and create as many Node objects as nodes I have in my network. The thing is I don't know how to make it create the node objects with different names so after I've created all the nodes objects I can refer to one of them.
    Something like this.
    int Id=0;
    id++;
    Node node+Id = new Node();
    I think its not possible to do something like that. If it isn't how can I do to refer to one of the objects I've created?
    Thanks.

    Twistx77 wrote:
    Thanks to both of you. I'll check out the Link and if I can't find the solution there I'll make the array , I don't know how I didn't think about doing that. There are two collections you should study specifically:
    First you have the ArrayList which in essense is a growable array. This means you don't have to decide in advance how big it can be.
    Second there's the HashMap. It's sometimes called an associate array. Such an array doesn't have fixed position indexes like an ordinary array. Instead each index (called key) is associated with a value but the keys don't have any particular order. Still, given a certain key, finding the corresponding value in a HashMap is almost as fast as an array access.

  • Objects with differnt no. of a class

    Hi Peoples!
    How can I create a class in which every time "new" operator is used on its constructor I get an Object with different number in sequence.
    S-x, where x is integer.
    so i get objects with nos. S-1, S-2, S-3.... S-100 ......

    Use a static variable to hold the next id. Something like this:
    public class SomeClass {
      private static int nextId = 1;
      private final String id;
      public SomeClass() {
        id = "S" + nextId;
        nextId++;

  • Why can't classes with private constructors be subclassed?

    Why can't classes with private constructors be subclassed?
    I know specifying a private nullary constructor means you dont want the class to be instantiated or the class is a factory or a singleton pattern. I know the workaround is to just wrap all the methods of the intended superclass, but that just seems less wizardly.
    Example:
    I really, really want to be able to subclass java.util.Arrays, like so:
    package com.tassajara.util;
    import java.util.LinkedList;
    import java.util.List;
    public class Arrays extends java.util.Arrays {
        public static List asList(boolean[] array) {
            List result = new LinkedList();
            for (int i = 0; i < array.length; i++)
                result.add(new Boolean(array));
    return result;
    public static List asList( char[] array) {
    List result = new LinkedList();
    for (int i = 0; i < array.length; i++)
    result.add(new Character(array[i]));
    return result;
    public static List asList( byte[] array) {
    List result = new LinkedList();
    for (int i = 0; i < array.length; i++)
    result.add(new Byte(array[i]));
    return result;
    public static List asList( short[] array) {
    List result = new LinkedList();
    for (int i = 0; i < array.length; i++)
    result.add(new Short(array[i]));
    return result;
    public static List asList( int[] array) {
    List result = new LinkedList();
    for (int i = 0; i < array.length; i++)
    result.add(new Integer(array[i]));
    return result;
    public static List asList( long[] array) {
    List result = new LinkedList();
    for (int i = 0; i < array.length; i++)
    result.add(new Long(array[i]));
    return result;
    public static List asList( float[] array) {
    List result = new LinkedList();
    for (int i = 0; i < array.length; i++)
    result.add(new Float(array[i]));
    return result;
    public static List asList( double[] array) {
    List result = new LinkedList();
    for (int i = 0; i < array.length; i++)
    result.add(new Double(array[i]));
    return result;
    // Now that we extend java.util.Arrays this method is not needed.
    // /**JCF already does this so just wrap their implementation
    // public static List asList(Object[] array) {
    // return java.util.Arrays.asList(array);
    public static List asList(Object object) {
    List result;
    Class type = object.getClass().getComponentType();
    if (type != null && type.isPrimitive()) {
    if (type == Boolean.TYPE)
    result = asList((boolean[])object);
    else if (type == Character.TYPE)
    result = asList(( char[])object);
    else if (type == Byte.TYPE)
    result = asList(( byte[])object);
    else if (type == Short.TYPE)
    result = asList(( short[])object);
    else if (type == Integer.TYPE)
    result = asList(( int[])object);
    else if (type == Long.TYPE)
    result = asList(( long[])object);
    else if (type == Float.TYPE)
    result = asList(( float[])object);
    else if (type == Double.TYPE)
    result = asList(( double[])object);
    } else {
    result = java.util.Arrays.asList((Object[])object);
    return result;
    I do not intend to instantiate com.tassajara.util.Arrays as all my methods are static just like java.util.Arrays. You can see where I started to wrap asList(Object[] o). I could continue and wrap all of java.util.Arrays methods, but thats annoying and much less elegant.

    Why can't classes with private constructors be
    subclassed?Because the subclass can't access the superclass constructor.
    I really, really want to be able to subclass
    java.util.Arrays, like so:Why? It only contains static methods, so why don't you just create a separate class?
    I do not intend to instantiate
    com.tassajara.util.Arrays as all my methods are static
    just like java.util.Arrays. You can see where I
    started to wrap asList(Object[] o). I could continue
    and wrap all of java.util.Arrays methods, but thats
    annoying and much less elegant.There's no need to duplicate all the methods - just call them when you want to use them.
    It really does sound like you're barking up the wrong tree here. I can see no good reason to want to subclass java.util.Arrays. Could you could explain why you want to do that? - perhaps you are misunderstanding static methods.
    Precisely as you said, if they didn't want me to
    subclass it they would have declared it final.Classes with no non-private constructors are implicitly final.
    But they didn't. There has to be a way for an API
    developer to indicate that a class is merely not to be
    instantiated, and not both uninstantiable and
    unextendable.There is - declare it abstract. Since that isn't what was done here, I would assume the writers don't want you to be able to subclass java.util.Arrays

  • How to inheritance a super class without no-argument constructor

    i try to inheritance javax.swing.tree.DefaultTreeModel:
    public class myTreeModel extends DefaultTreeModel
    but the compiler say:
    'constructor DefaultTreeModel() not found in class javax.swing.tree.DefaultTreeModel'
    and stoped.
    How can I get around this?
    THANK YOU for your consideration.

    Inside myTreeModel, i tried several things:
    1. add a no-argument constructor;
    Your no argument constructor should be either one of the below :
    public myTreeModel() {
       super(new DefaultMutableTreeNode());
    public myTreeModel() {
       super(new DefaultMutableTreeNode(), true);
    2. add a contructor with (DefaultTreeNode) argument;
    Your constructor with tree node argument should be either one of the below :
    public myTreeModel(DefaultMutableTreeNode node) {
       super(node);
    public myTreeModel(DefaultMutableTreeNode node) {
       super(node, true);
    }You would get an error if you did the following:
    public myTreeModel() {
    public myTreeModel(DefaultMutableTreeNode node) {
    }In both of the cases the default no arguement constructor of the super class is called implicitly like:
    public myTreeModel() {
       super();
    public myTreeModel(DefaultMutableTreeNode node) {
       super();
    }In this case the call super() is refering to a no arguement constructor in DefaultTreeModel. However, no such constructor exists in the DefaultTreeModel class resulting in a compile time error.
    Note: You do not need to use DefaultMutableTreeNode. You an use some other class that implements the TreeNode interface.

Maybe you are looking for

  • PC iCloud Mail and 'Parent Approval' on child purchases.

    Hi, I'm running Windows 7 Premium, I've installed iCloud and I can see all the various iCloud applications in my 'Applications' window.  I attempt to login to iCloud mail, and the login page appears, I enter my login information (that works on my iPa

  • How to get installed application list from a remote system

    i am using.. an windows XP OS.. i want to collect the installed application list(in any accessible format) from my near by system(any system in the network). and need to invoke any application (from the list generated) from my system..... please help

  • How to call a struts application in a portlet

    How to call a struts application in a portlet. I have two different ear's. In one ear I have my struts application and in one war i have a struts portlet. In the struts portlet provider.xml defaultAction tag can i call the action class .do which in o

  • No data available,data selection ended

    Hi Experts, In BI 7.4 quality system when I did the infopackage load for 0HR_PA_PD_1 (FULL) it is showing nodata available selection ended  in detail tab. But I have data in RSA3. when I saw the job in SM 37 in ECC Quality it is showing result of cus

  • Serial records:Lot/Serial validation failed.  Please check log for details

    Hi, Received error while performing Quantity On Hand Conversion at MTL_TRANSACTIONS_INTERFACE table, "Serial records:Lot/Serial validation failed. Please check log for details." Perfomred following steps, 1) Inserted data at MTL_TRANSACTIONS_INETRFAC