How to get name of a Component retuned by FocusEvent.getOppositeComponent()

Hi,
I have three instances of JTable named table1, table2, table3 and one button. For the button I have FocusListener which listens to focusGained event. The FocusEvent enables me to get the Component which has lost the focus by e.getOppositeComponent(). Now my question: how can I understand which instance is that component table1, table2, or table3? getName(), getAccessibleContext().getAccessibleName() return nulls. I SIMPLY WANT TO KNOW WHICH TABLE LOST FOCUS WHEN BUTTON WAS PRESSED.
Thanks

if you have the object use if (component instanceof table1) .....
Noah

Similar Messages

  • How to get the list of component?

        How to get the list of component through java API in Adobe CQ5?

    There are probably more than a few ways, but here is a little component .jsp code that uses the jcr query api to pull out all the components and list them on a page.  If I know CQ, there might be a way to ask for a list of components another way though, maybe through another API, or possibly a .json url, I might remember reading something about that, somewhere, lol, but this at least gets you the list in a somewhat simple way.
    Code Example:
    <%@include file="/apps/psul/components/global.jsp"%>
    <%@ page import="javax.jcr.*,
                       javax.jcr.query.*"
    %>
    <%
       // Login to create an anonymous session on the default workspace
       Session session = resourceResolver.adaptTo(Session.class);
           //Declare a query for all the components in the system
           String SQL = "select * from cq:Component";
    //side note: if you want just the components in your site area, then make the query more like below...
    //  SQL = "select * from cq:Component where jcr:path like '/apps/yoursitename/%'";
           QueryManager qm = session.getWorkspace().getQueryManager();
           Query query = qm.createQuery(SQL, Query.SQL);
           QueryResult result = query.execute();
           NodeIterator nodes = result.getNodes();
           while (nodes.hasNext()) {
               Node node = (Node)nodes.next();
               %>
                    <p><%=node.getName() %> (<b><%=node.getPath() %></b>)</p>
    <%     } %>

  • How to get name of sbRIO programatically

    How to get "name" and "Comment" of sbRIO which I write to sbRIO-9602 in MAX in Identification box (Model, Serial number, MAC address, Name)?
    Solved!
    Go to Solution.

    That shows:
     - IP settings
          - IP adress:        136...etc.
          - DNS name:      MyMaster5                   - THAT IS WHAT I NEED, just in wrong place - in MAX it is not in IP settings, that's why i didn't searched for it there.
          - subnet mask    255.255.255.0
          - gateway          136...
          - DNS server      136...
     - MAC address        00800...
     - serial number        16....
     - system state        Running
     - model name         sbRIO-9602
     - model code          7373
     - password protected restarts?    T/F
     - halt if TCP/IP fails?                   T/F
     - locked?                                   T/F
     - use DHCP?                             T/F
    Still there is no "comment" as in MAX. But that's not so important now.
    I have LW Development system 2009 SP1 Profesional, Realtime Development 2009 SP1
    Thanks very much!

  • How to get name of table from front end

    Hi,
    How to get name of table from front end in EBS 11i?
    thanx
    Ashish

    Hi
    Sandeep is correct. The "Help"/"Record History" will give you the table/view name, but sometimes this particular menu function give me a "Record History is not available here." error message.
    I then use the following menu functions (this will also give you additional information, like column details).
    1) Open Forms
    2) Click on Help/Diagnostics/Examine (*you might have to enter the APPS password at this point)
    3) Change "Block" to "System"
    4) Change "Field" to "Last_query"
    The system will populate the "Value" field with the query that was executed in order to populate the form.
    Regards
    Frank

  • How to get back deleted software component along with underlaying objects.

    Dear Experts,
    By mistake i deleted my software component. When i deleted it even doesn't ask for activate. When i check in change list there is no change list for that deleted software component. So request you please let me how to get back my software component with all the namespaces and objects.
    Please treat this as high priority and revert me back ASAP.
    Thanks in advance.
    HAri.

    I don't know if is possible to restore a deleted SoftComp and all dependent object in repository... You can try to renew the SoftComp import from SLD....

  • How to get names of sub tabs?

    Hi All,
    Could someone tell me how to get names of all sub tabs?
    I have Parent Tab T1. T1 has 3 sub tabs T1_1, T1_2 and T1_3.
    I would like to have T1_1, T1_2 and T1_3 sub tab names in the list.
    Thanks in advance!!
    Dip

    Dip,
    You can get the tab names from apex dictionary views, apex_application_tabs & apex_application_parent_tabs . Thanks.
    Regards,
    Manish

  • How to get names of method parameters ?

    How to get names of method parameters (Not only their type and value) is it only possible during debugging ??
    for example void myFunction(int a,int b)
    I need the "a" , and the "b" The issiue is about the java.lang.reflect.InvocationHandler ,
    and its method invoke(Object proxy,
    Method method,
    Object[] args)
    throws Throwable
    I Have the parameter objects themself and their types using method.getParameters() , this is fine ,, but i need the names of the parameters !!!

    If the class file was compiled without debug information included then it is impossible to get the original parameter names, as used in the source code.
    However, If the class file does include debug information, then the method names are hidden deep within the class file. You'd need to parse the class file yourself. Check out a copy of the Java VM Specification for a detailed format of the java class file format.
    It's not a trivial task to parse the java class file, and the VM spec isn't easy reading. You'd nearly be writing a class file disassembler.

  • How to get names of INCLUDE or FORM within included forms

    Hello,
    I want to get names of Include program and included form within included forms.
    I tried SY-REPID or SY-CPROG but these two SYST variables return the name of report program that performs the form, not the name of Include or form.
    Please give me any advice about how to get names of include / included form.
    thanks and regards,
    Hozy

    You can use the statement
    READ REPORT <Report name> into itab
    to read the source code into an internal table.
    Later you can use the "Contains Pattern" operator to get the statements that you need.

  • How to get names of all hard disks?

    Hi,
    How to get names of all hard disks.
    For example:
    There are 3 disks in my computer: A, C,D (OS:&#12288;Windows).
    and then I want to know how many disks (3) and their names( A, C, D) are there?
    Please give me some code sapmles. Thanks.
    (---sorry, my English is not very well----)

    Look at a few of these
    http://onesearch.sun.com/search/developers/index.jsp?qt=%22hard+disk%22+label&qp=forum%3A31&qp_name=Java+Programming&col=devforums

  • How to get names of all Windows in a Form Application at runtime

    Dear All,
    I want to get the name of all windows in a form module programatically at run time. How to get it?
    Any help or comments will be highly appreciated.
    Thanks in Advance.
    Best Regards
    Bilal

    Hi Francois Degrelle,
    First of all thanks for the response.
    What if I have no items on a content canvas? In my application, I am using content canvas to hold the Image banner and help text of the current form, having no items at all. I am also using tab canvases to hold all items of form. The tabs are displayed on the content canvas at run time. So the tab canvases acts like frames (In my case).
    Now if I am looping through items, it gives me the list of all of the tab canvases. Whereas the tab canvas always has no window assigned, as it is displayed on content canvas which has that Window which I need. Thus I am unable to get the names of windows in my case through the above stated procedure.
    Another option could be if I can get the name of the content canvas upon which the given tab canvas is displayed?
    Any way to do this or some other way to achieve the use case?
    Any help will be highly appreciated.
    Thanks in advance
    Bilal

  • How to get bounds of a component in FreeDesign layout

    When I try to get bounds of a component that is inside JPanel with FreeDesign layout, I get (0,0,0,0)!
    How can I find out current bounds of those components?

    When I add a component on JPanel with FreeDesign layout (I use NetBeans GUI editor to do it), in generated code I find org.jdesktop.layout.GroupLayout with some HorizontalGroup and VerticalGroup components, and no bounds are ever set!!! When I start the application, a component is shown on JPanel, and definitely bounds are not 0,0,0,0! The components are stretched over window, and everything looks just as I set in GUI editor. A problem is that in runtime I need to know bounds of a component that is showed on screen. A method getBounds() returns (0,0,0,0), so I think that it is not appropriate for this layout.
    So, my question remains: How to find out bounds of a component in FreeDesign layout!
    Thanks!
    Message was edited by:
    mmilic

  • How to get the Dynamic UI component value from JSFF page to any managedbean

    HI ,
    We have list of bean objects in jSF page we are iterating the list of bean using the forEach loop and displaying the value into Input type text (UI component) value filed .
    If we try to get the UI component value in Managed bean we are not getting the dynamic values .
    The below piece of code used to retrieve the dynamic values from the JSF page doesn't have any form :
    UIComponent component = null;
    FacesContext facesContext = FacesContext.getCurrentInstance();
    if (facesContext != null) {
    UIComponent root = facesContext.getViewRoot();
    component = findComponent(root, componentId);
    then component type casting to the based on UI component which we trying to access and getting the value as " NULL " ..Please let me know how to get the dynamic values form the JSF ?
    Please let me know if any other approach or any changes required on above ?
    Thanks

    Hi,
    the root problem is this
    <h:inputText id="it3" value="#{familyList.ctn}" />
    <tr:commandButton text="Save" id="cb3"Note how each row writes to the same managed bean property, thus showing the same data. Instead your managed bean should expose a HashMap property that you then apply values to using a key/value pair. The key could be the ID of the field, which then you also should dynamically define e.g. cb<rowIndx>. The command button could then have a f:attribute assigned that has the row HahMap key as a value. This way you truly create value instances for the object
    Frank

  • How to get name of an entry?

    I search in my schema with code below:
    List<OrganizationPojo> organizationPojoList = new ArrayList<OrganizationPojo>();
         DirContext ctx = null;
         try { 
         // get a handle to an Initial DirContext
         ctx = new InitialDirContext(env);
         String[] attrIDs = { "dc", "objectClass","ou" };
         SearchControls ctls = new SearchControls();
         ctls.setReturningAttributes(attrIDs);
         ctls.setSearchScope(SearchControls.SUBTREE_SCOPE);
         String filter = "(&(dc=*) (objectClass=organizationalUnit) (ou=*))";
         NamingEnumeration answer = ctx.search(searchBaseDn, filter, ctls);
         try
                   while (answer.hasMore())
                             SearchResult sr = (SearchResult) answer.next();
                             LdapName dn = new LdapName((String)sr.getNameInNamespace());
                             LdapName rdn = new LdapName((String)sr.getName());
    I learned SearchResult.getName returns the name "relative to search base"
    But i only want to get the name of entry.
    I am getting dn correctly but can not find out how to get rdn relative to parent in the tree.

    More generally, to get the RDN of any search result, you're nearly there:
    List<Rdn> rdns = new LdapName(sr.geNameInNamespace()).getRdns();
    Rdn rdn = rdns.get(rdns.size()-1);

  • How to get name or unix id of last switched System Events process?

    Hello
    I am writing a script to be used as an idle function to send a command to a process as soon as it's not frontmost anymore. So far, I can figure how to get the unix id or name of the frontmost process, but not of the previous process . Here is what I have:
    on idle {}
    my handleProcesses()
    return 5 --- '5' tells idle () to run every 5 seconds.
    end idle
    on handleProcesses()
    tell application "System Events"
    set FrontApp to (get name of every process whose frontmost is true)
    set PrevApp to (get name of previous process)
    end tell
    --- my command here, like tell PrevApp to hide...
    end handleProcesses
    My problem is that "previous process" is not in the System Events dictionary. I cannot use "frontmost if false" either, because this would return all other opened applications, not just the previous one.
    I know one partial solution would be to use Command-Tab, get the name of frontmost, and use Command-tab again. But, it's not really pratical nor elegant.
    What I need is a function which can get my frontmost process name (which is easy), and return it when the process is inactive (no more frontmost).
    Thanks.
    Vic

    You can do what you want if you maintain a record yourself of what used to be frontmost:
    tell application "System Events"
    set FrontApp to (get name of every process whose frontmost is true)
    set lastFrontApp to FrontApp
    repeat while FrontApp = lastFrontApp
    set FrontApp to (get name of every process whose frontmost is true)
    end repeat
    set BackApps to (get name of every process whose frontmost is not true)
    if lastFrontApp is in BackApps then
    --the app is open in the background
    else
    --the app was closed
    end if
    end tell

  • How to get name of selected image?

    Hello ,
    I want the name of selected image.I have PDEImage and PDEElement of selected image.
    How to get the name of selected image?is it possible to get name of image on document?
    please,help me.

    That information is not required to be stored in the PDF.  It present, it could be present in the XMP-based metadata of the image.
    Consult ISO 32000-1, ISO 16684-1 and the XMP specification for details.

Maybe you are looking for

  • M4V video files not downloading or viewing, just showing characters in browser tab

    Website I'm trying to download videos. http://www.eevblog.com/episodes/ I click on a video, it takes me to that videos page, somewhere down the page is a download link. I click the download and the browser tab starts filling up with all these strange

  • Hi Freinds......How to Encrypt/Decrypt Text file in j2me

    Hello friendz.,, I m having problem with textfile exncryption decryption in j2me.. Can abybode tell me how to encrypt/decrypt Text file using J2ME API's....... PLZ help me ....... Thanx in advance regards, Parag

  • Pending excise inv capture and posting

    hi, i m doing excise capturing and posting  with respect to Purchase Order,so where i can get pending P.O list ,for which i have not captured part1 or part 2.

  • Only allow datagridviewcheckbox to check off if it meets certain criteria.

    I have a datagridview with a checkbox column next to it. The datagridview holds a list of all open invoices for a given customer. I don't want the checkbox to check off if there is no money to apply to this invoice. Basically every time the checkbox

  • DB links security bug?

    Hi, I have several DB links in my APEX environment. I use them for different applications to connect to different bases located on different servers. Everything works fine but few days ago we noticed that during login process, new session is created