Referencing a Method KNOWN at runtime

I use Callback classes (usually based on function pointers) in every language I write. It makes it really easy to build complex state machines with the minimal possible code and memory usage.
I am really excited about reflection after experimenting with it. It appears that java might be the 3rd language I can apply my design patterns to.
However, my prototype is in-elligant to say the least and I am looking to parameterize it so that I can easily apply the same template across the entire footprint of this project. Here is my crude java callback class:
public class AttribCallback
AttribCallback( Object target, String zMethod ) throws NoSuchMethodException
    int iMethod = 0;
    Class clsTarget = target.getClass();
    java.lang.reflect.Method aMeth[] = getClass().getMethods();
    for( ;iMethod<aMeth.length;iMethod++ )
    { //xx TODO : FIND A BETTER way to do this!
      if( "Call"==aMeth[iMethod].getName() )
           break;
    m_methExec = clsTarget.getMethod(zMethod,aMeth[iMethod].getParameterTypes());
    m_oTarget = target;
  public com.castel.casdk.CASsymbol Call( java.util.Map.Entry<String,String> rEntry )
    try
       Object args[] = { rEntry };
       return (CASsymbol)m_methExec.invoke(m_oTarget,args);
    catch( Throwable rEx )
       Lib.LogErr( "XMLTag.AttribCB::Call() caught UNHANDLED EX=[%s]\n",rEx.toString());
       return CASsymbol.CAS_Status_Failed;
  java.lang.reflect.Method m_methExec;
  Object m_oTarget;
};I have method "CASsymbol Call( java.util.Map.Entry<String,String> rEntry )" clearly defined above in my callback class. Presumably, object target (passed to my constructor) is a user of my callback that has a method with the same sigature. My ctor looks up a known (at compile time) method it has with the same signature and uses its signature to retrieve the target method for later execution (say an asynch event subscribed to by this callback occurs).
The problem (solved crudely in the ctor above), is to get a reference to this Call method in my callback class so that I can use its parameters (and hopefully return type in the future) to retrieve the target method. This target method defined elsewhere can then be "Called Back" using AttribCallback.Call() without knowing anything but its name and the object that defines it. So six target methods can be defined in the Using class (all with the same singature) and targeted as my different callbacks under varying conditions or states.
AttribCallback.Call's signature is known at compile time. I can already reference classes by name (such as com.castel.package.AttribCallback.class). Is there a way for me to reference my method by name? (equivalent to &AttribCallback::Call in C++)
If not (and I am forced to search), is there a more fool-proof way for me to ensure I retrieved the right method than simply using the methods name in my search? What about the methods return type?
Finally, if I were to abstract the whole callback idea to a base class, is there a way for me to build a parameterized base class where the signature of my callback could be passed as a parameter (return type and parameter list)?
I might than define Call in my base class possibly at class initialization time, if possible?
I look forward to any feedback in this regard,
James
Beverly, MA

A crude generic class.
public class AttribCallback<Return, Param> {
     java.lang.reflect.Method m_methExec;
     Object m_oTarget;
     AttribCallback(Object target, String zMethod, Class<Param> classType) throws NoSuchMethodException {
          Class clsTarget = target.getClass();
          m_methExec = clsTarget.getMethod(zMethod, new Class[] { classType });
          m_oTarget = target;
     @SuppressWarnings("unchecked")
     public Return Call(Param rEntry) {
          try {
               Object args[] = { rEntry };
               return (Return) m_methExec.invoke(m_oTarget, args);
          catch (Throwable rEx) {
               return null;
     public static void main(String args[]){
          try {
               AttribCallback<String,String> ac = new AttribCallback<String, String>("ramki","concat",String.class);
               String returned = ac.Call("ramki");
               System.out.println("The return is "+returned);
          catch (NoSuchMethodException e) {
               // TODO Auto-generated catch block
               e.printStackTrace();
}

Similar Messages

  • Using multiple values in a where clause, for values only known at runtime

    Dear all
    I am creating a PL/SQL program which returns multiple rows of data but only where it meets a set id values that a user has previously chosen. The id values are stored in an associative array and are chosen by a user in the preceding procedure at run time.
    I know all the table and column names in advance. The only things I don't know are the exact number of ids selected from the id column and what their values will be. This will only be known at runtime. When the procedure is run by the user it prints multiple rows of data to a web browser.
    I have been reading the following posting, which I understand to a large extent, Query for multiple value search But I cannot seem to figure out how I would apply it to my work as I am dealing with multiple rows and a cursor.
    The code as I have currently written it is wrong because I get an error not found message in my web browser. I think the var_user_chosen_map_list_ids in the for cursor loop could be the problem. I am using the variable_user_chosen_map_list_ids to store all the id values from my associatative array as a string. Which I modified from the code that vidyadhars posted in the other thread.
    Should I be creating a OPEN FOR ref cursor and if so where would I put my associative array into it? At the moment I take the value, turning it into a string and IN part in the WHERE clause holds the string, allowing the WHERE clause to read all the values from it. I would expect the where clause to read everything in the string as 1 complete string of VARCHAR2 data but this would not be the case if this part of the code at least was correct. The code is as follows:
    --Global variable section contains:
    var_user_chosen_map_list_ids VARCHAR2(32767);
    PROCEDURE PROCMAPSEARCH (par_user_chosen_map_list_ids PKG_ARR_MAPS.ARR_MAP_LIST)
    IS
    CURSOR cur_map_search (par_user_chosen_map_list_ids IN NUMBER)
    IS
    SELECT MI.map_date
           MT.map_title,
    FROM map_info MI,
         map_title MT,
    WHERE MI.map_title_id = MT.map_title_id
    AND MI.map_publication_id IN
    (var_user_chosen_map_list_ids);
    var_map_list_to_compare VARCHAR2(32767) := '';
    var_exe_imm_map VARCHAR2(32767);
    BEGIN
    FOR rec_user_chosen_map_list_ids IN 1 .. par_user_chosen_map_list_ids.count
    LOOP
       var_user_chosen_map_list_ids := var_user_chosen_map_list_ids ||
       '''' ||
       par_user_chosen_map_list_ids(rec_user_chosen_map_list_ids) ||
    END LOOP;
    var_user_chosen_map_list_ids := substr(var_user_chosen_map_list_ids,
                                            1,
                                            length(var_user_chosen_map_list_ids)-1);
    var_exe_imm_map := 'FOR rec_search_entered_details IN cur_map_search
    LOOP
    htp.print('Map date: ' || cur_map_search.map_date || ' Map title: ' || cur_map_search.map_title)
    END LOOP;';
    END PROCMAPSEARCH;EXECUTE IMMEDIATE var_exe_imm_map;
    I would be grateful of any comments or advice.
    Kind regards
    Tim

    I would like to thank everyone for their kind help.
    I have now successfully converted my code for use with dynamic SQL. Part of my problem was getting the concept confused a little, especially as I could get everything work in a static cursor, including variables, as long as they did not contain multiple values. I have learnt that dynamic sql runs the complete select statement at runtime. However even with this I was getting concepts confused. For example I was including variables and the terminator; inside my select string, where as these should be outside it. For example the following is wrong:
         TABLE (sys.dbms_debug_vc2coll(par_user_chosen_map_list_ids))....
    AND MI.map_publication_id = column_value;';Where as the following is correct:
         TABLE (sys.dbms_debug_vc2coll('||par_user_chosen_map_list_ids||'))....
    AND MI.map_publication_id = column_value';PL/SQL is inserting the values and then running the select statement, as opposed to running the select statement with the variables and then accessing the values stored in those variables. Once I resolved that it worked. My revised code is as follows:
    --Global variable section contains:
    var_user_chosen_map_list_ids VARCHAR2(32767);
    var_details VARCHAR(32767);
    PROCEDURE PROCMAPSEARCH (par_user_chosen_map_list_ids PKG_ARR_MAPS.ARR_MAP_LIST)
    IS
    BEGIN
    FOR rec_user_chosen_map_list_ids IN 1 .. par_user_chosen_map_list_ids.count
    LOOP
       var_user_chosen_map_list_ids := var_user_chosen_map_list_ids ||
       '''' ||
       par_user_chosen_map_list_ids(rec_user_chosen_map_list_ids) ||
    END LOOP;
    var_user_chosen_map_list_ids := substr(var_user_chosen_map_list_ids,
                                            1,
                                            length(var_user_chosen_map_list_ids)-1);
    var_details := FUNCMAPDATAFIND (var_user_chosen_map_list_ids);
    htp.print(var_details);
    END PROCMAPSEARCH;
    FUNCTION FUNCMAPDETAILS (par_user_chosen_map_list_ids IN VARCHAR2(32767)
    RETURN VARCHAR2
    AS
    TYPE cur_type_map_search IS REF CURSOR;
    cur_map_search cur_type_map_search;
    var_map_date NUMBER(4);
    var_map_title VARCHAR2(32767);
    begin:
    OPEN cur_map_search FOR
    'SELECT MI.map_date,
           MT.map_title
    FROM map_info MI,
         map_title MT,
         TABLE (sys.dbms_debug_vc2coll(' || par_user_chosen_map_list_ids || '))
    WHERE MI.map_title_id = MT.map_title_id
    AND MI.map_publication_id = column_value';
    LOOP
    FETCH cur_map_compare INTO
    var_map_date,
    var_map_title;
    var_details := var_details || 'Map date: '||
                        var_map_date ||
                        'Map title: ' ||
                        var_map_title;
    EXIT WHEN cur_map_compare%NOTFOUND;
    END LOOP;
    RETURN var_details;
    END FUNCMAPDETAILS;Kind regards
    Tim

  • How to use multi async method in Windows Runtime Component (C#)

    I want to migrate an async method into Windows Runtime Component.
    CookieContainer cc = await utility.GetCookieContainer();
    But the content of async method still contains async methods.
    public async Task<CookieContainer> GetCookieContainer()
    if (stsAuthToken != null)
    if (DateTime.Now > stsAuthToken.Expires)
    this.stsAuthToken = await GetMsoStsSAMLToken();
    AuthCookies cookies = await GetAuthCookies(this.stsAuthToken);
    CookieContainer cc = new CookieContainer();
    Cookie samlAuthCookie = new Cookie("FedAuth", cookies.FedAuth)
    Path = "/",
    Expires = this.stsAuthToken.Expires,
    Secure = cookies.Host.Scheme.Equals("https"),
    HttpOnly = true,
    Domain = cookies.Host.Host
    cc.Add(this.spSiteUrl, samlAuthCookie);
    Cookie rtFACookie = new Cookie("rtFA", cookies.RtFA)
    Path = "/",
    Expires = this.stsAuthToken.Expires,
    Secure = cookies.Host.Scheme.Equals("https"),
    HttpOnly = true,
    Domain = cookies.Host.Host
    cc.Add(this.spSiteUrl, rtFACookie);
    this.cookieContainer = cc;
    And even GetMsoStsSAMLToken and GetAuthCookies contain async methods...
    How to migrate it?

    Hi Matt,
    I'm sorry for my unclear description.
    My WinRT Component is for Javascript. If I use folloiong codes, error occurs.
    public static async Task<bool> GetInternal(string url, string username, string password)
    bool r = await AuthUtility.Create(new Uri(url), username, password);
    return r;
    The error is
    SharePointWindowsRuntimeComponent.Common.GetInternal(System.String, System.String, System.String)' has a parameter of type 'System.Threading.Tasks.Task<System.Boolean>' in its signature. Although this generic type is not a valid Windows Runtime type,
    the type or its generic parameters implement interfaces that are valid Windows Runtime types.  Consider changing the type 'Task' in the method signature to one of the following types instead: Windows.Foundation.IAsyncAction, Windows.Foundation.IAsyncOperation,
    or one of the other Windows Runtime async interfaces. The standard .NET awaiter pattern also applies when consuming Windows Runtime async interfaces. Please see System.Runtime.InteropServices.WindowsRuntime.AsyncInfo for more information about converting managed
    task objects to Windows Runtime async interfaces.
    Some articles said, Task<T> is not WinRT type and should be converted to IAsyncOperation<T>. Only stirng, int, bool, object, array of above types and some 'simple' type can be used. (The
    related article)
    Then I try to convert Task<bool>, but the codes don't work.
    Above is why I ask this question.
    If async method can be used in WinRT component directly, please let me know why I got above error.
    Thanks.

  • Referencing a method from another class

    Hi,
    I am creating a chat program using RMI and i am experiencing a few difficulties. I would be very grateful if you could help me with the following problem.
    I'm getting the following error:
    non-static method Login(java.lang.String,java.lang.String) cannot be referenced from a static context
    The code is:
    GUI code/
    boolean loggedOn = ChatClient.Login(username,password);
    which is referencing the method Login in the class ChatClient class. I want to return a boolean value back. So i can use the variable loggedOn.
    The ClientChat Login method code is:
    public boolean Login(String username, String password) throws RemoteException
    try
    Chat c = (Chat)Naming.lookup("rmi://localhost/chat1");
    boolean loggedOn = c.Login(username,password,this);
    catch (Exception e)
    e.printStackTrace();
    return loggedOn;
    but i get an error saying it does not recognize the variable loggedOn.
    Can anyone please suggest some possible solutions.
    Many thanks,

    You have a scope problem.
    int youCanSeeMe = 1;
    try
       int youCannotSeeMe = 3;
       youCanSeeMe = 2;
    catch (Exception e)
       e.printStackTrace();
    System.out.println(youCanSeeMe);
    System.out.println(youCannotSeeMe);What is the difference in the location of the declaration of the two variables youCanSeeMe and youCannotSeeMe? You want loggedOn to look like youCanSeeMe.
    Your static problem needs something like this:
    ChatClient myClient = new ChatClient();
    myClient.Login("user","pass");You need to call Login on an instance of ChatClient.

  • Get method parameters at runtime?

    Hey guys,
    is there a way to get the parameters of a methods parameters at runtime? I have a reference to an object and would like to know which paranmeter does a method have.?
       thx

    Hello
    You can use class CL_OO_CLASS (instance attribute METHOD_PARAMETERS ).
    Regards
      Uwe

  • How to determine method name at runtime

    hello,
    i try to get method name at runtime..i have a logger and i need this info for logger
    private void method(){
    myLogger.debug( "exception in " + getExecutedMethod() ); /* output should be: exception in method */
    }best regards
    cem

    bcem wrote:
    what i needed was
    [http://today.java.net/pub/a/today/2008/04/24/add-logging-at-class-load-time-with-instrumentation.html|http://today.java.net/pub/a/today/2008/04/24/add-logging-at-class-load-time-with-instrumentation.html]
    regards
    cemYou could also use AOP to add logging. But really, any sort of injected logging is going to be of limited value, since it's very generic and "this method was called with these parameters"-esque. Explicit logging is a lot more descriptive and useful, particularly to support staff who probably won't know what any particular method does

  • Create data reference to a table that is known at runtime

    Hi,
    I am trying to create a data reference to a table that is known only at runtime. In system 4.6C, I am not able to insert this coding
    data: lr_data type ref to data.
    CREATE DATA lr_data type table of (structure_name).
    In hihger releases, I am able to do so.
    Could you please tell me how to solve this problem in 4.6C?
    Best regards,
    Fabian

    Hi fabian,
    If i understood,
    u want to create a dynamic internal table.
    1.
      For this purpose,
      in my program,
      there is an INDEPENDENT FORM
      whose inputs are
      TABLE NAME / STRUCTURE NAME
      and from those, it consructs dynamic table.
    2. Here is the program.
    the dynamic table name will be
    <DYNTABLE>.
    3. U can use this program (FORM in this program)
    to generate any kind of internal table
    by specifying TABLE NAME .
    4.
    REPORT abc.
    COMPULSORY
    FIELD-SYMBOLS: <dyntable> TYPE ANY TABLE.
    FIELD-SYMBOLS: <dynline> TYPE ANY.
    DATA: lt TYPE lvc_t_fcat.
    DATA: ls TYPE lvc_s_fcat.
    FIELD-SYMBOLS: <fld> TYPE ANY.
    DATA : fldname(50) TYPE c.
    parameters : iname LIKE dd02l-tabname.
    START-OF-SELECTION.
    PERFORM
    PERFORM mydyntable USING lt.
    BREAK-POINT.
    INDEPENDENT FORM
    FORM mydyntable USING ptabname.
    Create Dyn Table From FC
    FIELD-SYMBOLS: <fs_data> TYPE REF TO data.
    FIELD-SYMBOLS: <fs_1>.
    FIELD-SYMBOLS: <fs_2> TYPE ANY TABLE.
    DATA: lt_data TYPE REF TO data.
    data : lt TYPE lvc_t_fcat .
    DATA : ddfields LIKE ddfield OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'DD_NAMETAB_TO_DDFIELDS'
    EXPORTING
    tabname = iname
    TABLES
    ddfields = ddfields.
    CONSTRUCT FIELD LIST
    LOOP AT ddfields.
    ls-fieldname = ddfields-fieldname.
    APPEND ls TO lt.
    ENDLOOP.
    ASSIGN lt_data TO <fs_data>.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
    EXPORTING
    it_fieldcatalog = lt
    IMPORTING
    ep_table = <fs_data>
    EXCEPTIONS
    generate_subpool_dir_full = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    ENDIF.
    Assign Dyn Table To Field Sumbol
    ASSIGN <fs_data>->* TO <fs_1>.
    ASSIGN <fs_1> TO <fs_2>.
    ASSIGN <fs_1> TO <dyntable>.
    ENDFORM. "MYDYNTABLE
    regards,
    amit m.

  • Problem referencing to methods with generic type parameters

    Assuming I have an interface like to following:
    public interface Test <T> {
    void test ( T arg0 );
    void test ( T arg0, Object arg1 );
    I would like to reference to both "test"-methods using "{@link #test(T)}" and "{@link #test(T,Object)}".But this generates an error telling me "test(T)" and "test(T,Object)" cannot be found.
    Changing T to Object in the documentation works and has as interesing effect. The generated link text is "test(Object)" but the generated link is "test(T)".
    Am I somehow wrong? Or is this a known issue? And is there a workaround other than using "Object" instead of "T"?

    Hi,
    I bumped into the same problem when documenting a generic.
    After quite a while of search your posting led me to the solution.
    My code goes something like this:
    public class SomeIterator<E> implements Iterator<E> {
      public SomeIterator(E[] structToIterate) {
    }When I tried to use @see or @link with the constructor Javadoc never found it.
    After I changed the documentation code to
    @see #SomeIterator(Object[])it worked.
    Since both taglets offer the use of a label, one can easily use these to produce comments that look correct:
    @see #SomeIterator(Object[]) SomeIterator(E[])CU
    Froestel

  • How to raise exception in bor method without showing runtime error

    I want to raise custom exception in the bor method like below. However, it will show runtime error when executing codes below. Any knows how to raise custom exception in the bor method without runtime error?
    raise 9021.

    Hi Nick
    You need to define the exception 9021 for the method and then you use the macro EXIT_RETURN as below
    exit_return 9021 sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    Regards
    Ravi

  • ADF -how to create table binding when view object is no known until runtime

    I want to programmatically create a table binding to a view object where the view object name is not known until run-time. Then I will use a dynamic table to display it. Can anyone provide an example?

    I looked at example #9. It gets me closer to what I am looking for but not quite enough. In my case, I don't have (or want in this case) a pageDefinition with a pre-declared Iterator binding. I am converting an exsisting BC4J/Struts/JSP application. I would like to rewrite my reusable component tags to make use of ADF bindings and Faces. My tags are passed the ApplicationModule and ViewObject names as parameters, much like the old BC4J datatags. I do not want to go back and rewrite all of my pages from scratch using drag-and-drop declarative bindings with a pageDefinition for every page. I am hoping to have my rewritten tags handle everything programmatically based only on the ViewObject name passed at run-time.

  • How to restrict columns in Advanced search which are known at runtime

    Hi Team,
    I need your suggestions for one of my adf search usecase. I had Querypanel with table on UI...where in Viewobject has relations with 2 other tables and this Viewobject is based on Entity...now in advanced search for addfields i was getting all column names by default like 3 tables column names....instead of all columns i need to restrict to particular columns. This particular columns will be decided at runtime like how many columns needs to be shown and alias names for those particular columns. So could you please help me how to approach this requirement.
    Thanks in Advance for your help.

    whatever you said is at designtime wherein we can uncheck the Queryable checkbox....but as i said at runtime from the application i can come to know whichever fields needs to be there and alias names for columns for add fields in Advanced search...

  • Referencing a method in one class from a constructor in another?

    Hi,
    I'm not sure whether this is a simple question or not, but instead of rewriting the method in another class, is there a way that I can reference that method, eg:
    public int getTitleCode() {
            return titleCode;  }within the constructor of another class. I don't want to use inheritance with this because it would change all my existing contructors.
    Any ideas how to do this, or is it just simpler to add the method to both classes?
    Many thanks!

    Hi,
    I'm trying to use a method, defined in Class A, within one of the constructors in Class B. Class B object represents a copy of the output of Class A, with the addition of a few extra methods.
    Therefore to represent the details correctly in the saved text file for class B, I need to call a method from class A to save the text file for class B correctly.
    Class B saves a file with a reference number unique to that class, plus a reference number that is also saved in the text file for class A.
    I can achieve the correct result for the above by having the same method in both classes, but I just wondered whether instead of this I could in fact call the method from class A in the constructor for class B. With the following code,
        referenceNumber = refNum;
            titleReferenceNumber = titleRefNum;
            titleRefNum = titles.getTitleCode();
        }I just get a 'nullpointerexception' when I try to run this in the main class.
    Any help or advice appreciated!

  • How do I create an instance of a class only known at runtime?

    Hi, thanks for reading - my problem is this:
    I am trying to build a program which searches through a folder and locates all *.class files present and forms an array of these classes. These classes will all be children of a parent class, template.class, so a common class interface will be involved.
    I have done my background research and have been pointed in the general direction of the .lang package, the reflection package, beans and so forth but frankly I have not a clue. I'm not even sure what this kind of operation is called...
    Thanks for your time.

    String classname = "Abc.class";
    Class class = Class.forName(classname); // catch ClassNotFoundException
    Object object = class.newInstance(); // catch InstantiationExceptiion
    MyIntrface myInterface = (MyInterface)object; // catch ClassCastException

  • Runtime classes method exec

    What is the purpose of exec(String cmd[ ],String env[ ],File) method in the Runtime class of lang package and can I give more than one command in the first string and will they be executed?Plz help

    What is the purpose of exec(String cmd[ ],String
    env[ ],File) method in the Runtime class of lang
    package and can I give more than one command in the
    first string and will they be executed?Plz helpTo try to give a detailed explanation as a response would take pages and pages. A lot of this is covered in http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html so give this a read, then a second read and then come back.
    You need to say what you mean by 'more than one command'. Do you mean 'more than one command on the command line' or do you mean 'more than one command passed to the stdin of some command processor' ? Either way, you need to specify the operating system you are using and the sort of commands you want to use.

  • Dynamic Tray creation at runtime

    hi experts,
    we have a requirement where we are showing employee details in the tray UI element.
    we have 1 tray at design time showing employee details obtained from a Bapi.
    Now we need to display spouse details(if available) and children details(their number can be any~known at runtime) in seperate trays. eg each tray for 1 person..so if there are 6 children, there are 8 trays including one for employee and spouse...
    Now what I need is the source code  or method to dynamically generate tray at runtime along with the labels and textviews they contain..
    thanks in advance

    HI,
    solved the problem....
    i was doing some search here and there and finally got the code to do it. when i came back to the thread i found Ramesh suggested the same stuff which i had used.
    thanks gurus.
    I am writing my code here for other people looking for the same thing:
    IWDTransparentContainer container =(IWDTransparentContainer)view.getElement("RootUIElementContainer");
         wdContext.currentContextElement().setIpvalue("Demo Name");   //this is my context attribute.
    for(int i=1;i<3;i++)
         IWDTray tray=(IWDTray)view.createElement(IWDTray.class,null);
                   tray.setExpanded(false);
                   tray.setWidth("700px");
                   IWDLabel label=(IWDLabel)view.createElement(IWDLabel.class,null);
                   label.setText("your name is");
              IWDTextView textview1=(IWDTextView)view.createElement(IWDTextView.class,null);
              textview1.setText(wdContext.currentContextElement().getIpvalue());
              IWDLabel label1=(IWDLabel)view.createElement(IWDLabel.class,null);
              label1.setText("Employee age");
         IWDCaption caption =(IWDCaption)view.createElement(IWDCaption.class,null);
         caption.setText("WElcome to employee information");
                   tray.setHeader(caption);
         IWDLayout layout=(IWDLayout)tray.createLayout(IWDMatrixLayout.class); //setting tray layout to matrix
         IWDLayoutData layout1=(IWDLayoutData)label1.createLayoutData(IWDMatrixHeadData.class);
         tray.addChild(label);
         tray.addChild(textview1);
         tray.addChild(label1);
                   container.addChild(tray);
    P.S. Awarding points to Ramesh.

Maybe you are looking for

  • Re: how to capture a frame from a video file and save it as a jpeg

    package com.snn.multimedia; * @(#)FrameAccess.java     1.5 01/03/13 * Copyright (c) 1999-2001 Sun Microsystems, Inc. All Rights Reserved. * Sun grants you ("Licensee") a non-exclusive, royalty free, license to use, * modify and redistribute this soft

  • JMX API to Create Event Generator

    Is there any JMX API available to create JMS event generator? Thanks

  • Msi GT780DXR wont start anymore

    Hello, For some reason my laoptop doesn't Start anymore. When I press the power button nothing happens, no lights,no fans, just nothing. It started this week with random shut downs but after that the laptop always rebooted on its own. Today however i

  • Error Occured in __XML_SEQUENTIAL_LOADER

    Hi, I'm re-populating a cube using a procedure that has been working fine for some years when all of a sudden I run into this error: ***Error Occured in __XML_SEQUENTIAL_LOADER: In __XML_UNIT_LOADER: In __XML_LOAD_MEAS_CC_PRT_ITEM: In ___XML_LOAD_TEM

  • 3d TV

    What's the difference between a FULL 3d and 3d READY TV????? Solved! Go to Solution.