Getting the name of the component

How can I get the name of the component at run time. I'm trying to find out the name of components like JTextField. I've already tryed <component>.getName() but it returns null.
Tks
Roberto Garcia

That must be because you didn't ever call the component's setName() method.
Or what did you expect the "name" of the component to be?

Similar Messages

  • Getting the name of the generic class?

    I have a generic class declared as such:
    public class MyClass<T>
    and I want to access the name of the <T> class a member function in that class? I just can't figure out which syntax to use.
    Thank you!
    Joshua

    Sorry, I'm a little bit confused at your answer.
    I cannot seem to instantiate an object of class T, like: T item = new T();does not work. If I can't create an object of type T, then I can't get it's type. I need to get the class even if I don't have any instantiated objects (or if I can create a blank one), so that I can use the name to fetch the objects from the persistence engine. Here is the class, so you can see what I'm talking about. I have in there now what seems like it should be right, but doesn't compile.
    A small example of solution please?
    public class PersistentSelectorCellEditor<T> extends AbstractCellEditor
              implements TableCellEditor {
         JComboBox control;
         List<T> choices;
         Session session;
         public PersistentSelectorCellEditor() {
              initializeComponents();
         public PersistentSelectorCellEditor(Object value) {
              initializeComponents();
              this.control.setSelectedItem(value);
         private void initializePersistence() {
              session = LabApp.getSession();
              session.beginTransaction();
         private void initializeComponents() {
              initializePersistence();
              populateList();     //query for selections to fill combo box
              control = new JComboBox((ComboBoxModel)choices);
         private void populateList() {
              //query to populate drop down lists
              Query query = session.createQuery("from " + T.class.getName());
              choices = query.list();
         public void setValue(T value) {
              control.setSelectedItem(value);
         public T getValue() {
              return (T)control.getSelectedItem();
         //interface members
         public Object getCellEditorValue() {
              return control.getSelectedItem();
         public Component getTableCellEditorComponent(JTable table, Object value,
                   boolean isSelected, int row, int column) {
              return control;
    }Thank you!
    Joshua

  • Mail running under LIon no longer grays out the name of the sender of an email that has been read.  How can I get that to happen?

    Under the old version of Mail, when an e-mail was read, the name of the sender was greted out so that I knew I had read that email.  This does not seem to happen under the new Mail thaqt came with Lion.  Help!?
    Chuck Humphrey
    [email protected]
    303-997-2755

    Kirk,
    Thanks again for your suggestions. No, I don't get an
    error message. In fact nothing happens. My name and
    key are typed in and from what I understand, once you
    do that with a real key it directs you to the
    registration page. When I get done entering the
    information the window just sits there without any
    button or option to continue.
    QT Pro is already in the QT (non-pro) you installed and the key (which is a hash of your name in part) allows the Pro features to work.
    No redirect, internet, nothing like that. As such many people have activated and think they haven't. Just look at the menu items and see if the "Pro" logo is shown next to a few (which are greyed out and not available without Pro). If not you are done.

  • Any Function module or BAPIs are available to get scheme name for the inter

    I have internal order no value in table  AUFK-AUFNR ,  and the internal order corresponding Scheme value is available in IMPR-PRNAM . Now I want to inner join both the tables to extract the data , but there is no common field . Is there any Function module or BAPIs are available to get scheme name for the internal orders?

    look at DB-VIEW  "V_IVP_OR".
    Regards,
    Laurent

  • Just updated my iphone. Now I can se I have two? iCloud accounts? One of them appears on my phone, and I have forgotten the password. When I try to add the other account, I get the message that this account is already added, but with the name of the first

    Just updated my iphone. Now I can se I have two! iCloud accounts? One of them appears on my phone, and I have forgotten the password. When I try to add the other account, I get the message that this account is already added, but with the name of the first account where there is no available password. I have tried several times to reset the password, bun I don't get the information I need - I have no access to email. What can I do?

    Hi, thanks for the suggestion. I have tried as you suggested, and when opening the "purchased" apps some have the icloud logo next to them, but I only have "OPEN" against "Find My iPhone". When opening it up, it goes through the same routine; needs to be updated before proceeding, and wouldn't update because I don't have IOS8.
    Anything else I could try, or am I doomed!
    All of your help is much appreciated, thanks

  • How can i get my name on the finder bar?

    How do i get my name on the top right corner next to the search bar? I have OS X Mountain Lion 10.8.5

    System Preferences > Users & Groups
    Click the lock to unlock it, if you have to.
    Click "Login Options".
    Enable " Show fast user switching menu as" and select "Full Name".
    Best.

  • Need of a Webservice to get the name of the file in a Folder

    Hi All,
    I am in need of a Web service which should get the name of the file in a folder.
    Note :  Folder is created in the MOSS server.
    Thanks.

    Just to add, Mac in intergrated into AD and all I need is help in creating the script
    Thanks

  • Installed office for mac (trial version). now I got 2 excel files, which cannot be deleted. I googled the names of the sheets and found chinese websites I never visited. Are those dialers? How can I get rid of them? system is mac lion(with win 7 parallel)

    now I got 2 excel files, which cannot be deleted on my desktop. I can't open them, either. I googled the names of the sheets and found chinese websites I never visited. Are those dialers? How can I get rid of them? system is mac lion (with win 7 parallel)

    The people who make that stuff have their own forums you can also search/ask in:
    http://answers.microsoft.com/en-us/mac/forum

  • How to get the name of the current tab.

    Hi Experts,
    I have two tabs in my tab strip and a button common to both the tabs.Can you please let me know how to get the name of the current tab in the event method of the push button.
    Thanks in advance.
    Regards,
    Arun

    1.Declare an Action for OnSelect event of Tabstrip. This event is triggered whenever any change in tab occurs.
    2. Declare an Import Parameter in this method
       Tab type String.
    3. This parameter has value of the selected TAB.
    4. You can set this value in some Attribute in Attribute Tab in this event only (OnSelect):
         wd_this->Att  = Tab.
    Att is the attribute created by you in Attributes Tab of View. ( of type String)
    5. Now the selected Tab ID is stored in this Attribute Att.
    6. In the Onaction of Button , retrieve the selected tab value from this attribute using :
               Data : lv type string.
                lv =  wd_this->Att
    Now lv has your selected TAB ID.
    I hope it would help you.
    Edited by: Saurav Mago on Oct 13, 2009 2:22 PM

  • How to get the name of the attachment in Sender Mail Adaper?

    hi mates,
    I've scenario a where in I need to pick up a mail with an attachment and change its extension and send it to target system using file adapter.
    I'm able to pick up the mail with attachment using sender mail adapter but not able to get the name of the attachment so that I can use it in mapping or on the adapter configuration. How do I read the name of the attachment and manupulate it?
    I looked at the thread sender mail adapter - attachment name But the solution is not described. I think Stefan is talking about the SP!2 for PI 7.0. I'm on XI 3.0 what is the equivalent SP for that, SP20? Stefan, can you please throw me more light on it?
    I appreciate your valuable inputs
    thx in adv
    praveen

    Thanks Aamir.
    Earlier I replied to that thread asking for more details...but did not see the response...
    anyways, thanks for your quick help..
    but I wonder abt the PI SP12/ XI SP20 pre-requisite. We can have adapter modules on SPs lower than PI SP12/XI SP20 as well, can we not?
    thanks
    praveen

  • How do I get the name of the app server in an application

    I am trying to run two app servers of one database. My problem is that I am trying to insert a link in a report that would link to another report by passing parameters through the URL which works fine if you stay on one server.
    If I request the link from http://portal1/servlet..... when the app is being served from http://portal2/servlet... server. How do tell the app that I am on portal2 and the the URL for the next page should be http://<the name of the server used>/servlet....
    The ideal is if the app servers LSNR_TOKEN or SITE_ID could be returned on request from a package.
    Thanks,

    Use the following function to get the corresponding server name
    wwctx_api.get_host
    and you can concatenate this with other values to form your required URL.
    (eg: l_url := 'http://'||wwctx_api.get_host||'/pls/portal30/...')
    Hope this helps!
    -Krishnamurthy

  • How to get the name of the ApplicationServer during runtime

    Within a Servlet or JSP, I'm trying to programmatically get the name of the JVM (AppServer) where the code (war or ear) is deployed and running under.
    (This is like getting "server1" when using WSAD).
    I tried the System, Runtime and Thread approaches with no luck.. any ideas??
    Thanks.
    Example:
    If I have 2 AppServers created: Server1 and Server2
    The ear could be deployed to either, but I want to show to the user if he/she is pointing to Server1 or Server2.

    do you want to get the defined length of the field right.
    i.e
    itab-field1(10) .
    and not the length of the value in the itab.
    one of the ways is to use the following FM
    move: sy-repid to wf_repid  ,
            'INT_OUTPUT' to int_tab_name .
      call function 'REUSE_ALV_FIELDCATALOG_MERGE'
       exporting
         i_program_name              = wf_repid
         i_internal_tabname          = int_tab_name
    *   I_STRUCTURE_NAME             =
    *   I_CLIENT_NEVER_DISPLAY       = 'X'
        i_inclname                   = wf_repid
        i_bypassing_buffer           = 'X'
    *   I_BUFFER_ACTIVE              =
        changing
          ct_fieldcat                  = wf_fld_cat[]
       exceptions
         inconsistent_interface       = 1
         program_error                = 2
         others                       = 3
      if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    which would give you all the field definitions of your itab.
    Raja

  • How to get the name of the file parent

    Hi,
    i have a file in this location
    File file = new File(MyFile.doc)
    file.getParent(); returns
    C:\Documents and Settings\Administrator\xyz
    now from the string obtained i just want to get the value "xyz".i.e. i want to get the name of the parent directory.
    how is it possible

    You may use String.indexOf()if(file.getParent().indexOf("/myProject/myPackage") != -1) {
        ...Or you might use regular expressions and Matcher class (or String.matches()) in case of higher complexity.

  • How to get the name of the currently used display variant

    Dear all,
    I found the user-exit EXIT_SAPLGRAP_001 for programming download authorization.
    With us no standard user is allowd to download data from R/3. With the user-exit it would be possible to allow certain downloads. one problem i solved already.
    For programming the second authorization i need the name of the currently used display variant in RKPEP000. Where can i get the name. I tried user-exits for RKPEP000, but i didn't find the name. I didn't find it in SYST either.
    Thanks and reargs
    Monika

    First you need to enter those names. Right-click the songs (Windows) or go to File>Get Info (All Platforms), then go to the second tab from the left to insert the information.

  • How to get the name of the subform

    Hi All,
    My form is designed in the below structure.
    masgterpage-->form1-->table
                                  -->subform
    How can i get the name of the subform dynamically(as it varies from page to page, but the rest of the structure is same).
    Please help me.
    Thank you,
    Saravanakumar.

    Hi there,
    the name property would be the correct attribute to get the subform name, just by looking at the code it doesn't seem like it's doing the right thing
    I am assuming that you send Main in the function countChk() which would look something like this
    countChk(Main);
    And you probably want to make sure you are entering the right subform so you need to keep that loop at the end of the function
    but if you want to get through all the checkboxes inside that subform you must do a loop through that node to find each checkbox
    I am assuming that the function would probably look something like this
    function countChk(vNode) {//Starts vNode with Main
         for (var i = 0; i < vNode.nodes.length; i++) {
              if (vNode.nodes.item(i).className === "field") {
                   if (vNode.ui.oneOfChild.className === "checkButton") {
                        if (vNode.items.nodes.length > 1) {
                             if (vNode.value.oneOfChild.value == 1) {
                                  nChk++ ;
              }else if (vNode.nodes.item(i).className === "subform"){
                   if (vNode.nodes.item(i).name === "Door_Subform"){
                        countChk(vNode.nodes.item(i));
         }//endloop
    Hope this help!

Maybe you are looking for

  • Old purchased folder transfer to new computer

    I have a new computer and after I transfered all my music from the old computer to my new comouter the purchased folder on the new computer was empty. How do I fill the folder with the music I purchased before the file move without going through all

  • Watching movies on my TV from PC

    I have a Toshiba Satelite  PSAFGU-020002PC thats been updated to a WIndows 7 We are trying watch the movies from our PC to TV  Inpaticular the new Rainierland website that streams new movies I bought an new Monster HDMI cable and AUVO USB to HDMI Ada

  • I am new to iOS and just have basics understanding regarding App Development. I would like to work on IRKIT. Any Beginner Guide or reference regarding IRKIT ?

    I am new to iOS and just have basics understanding regarding App Development. I would like to work on IRKIT. Any Beginner Guide or reference regarding IRKIT ?

  • MC in a MC

    Hey Guys, Here is my basic build up Menu (MC)      Btn1      Btn2      Btn3 Content (MC)      Frame1      Frame2      Frame3 I want the buttons in the MenuMc to control the frames in the ContentMc. Whats wrong? (This is the code in the MenuMC, of cou

  • ELEMENTS 6.0 Fragen

    Hallo Leute, ich will mir ein gescheites Bildbearbeitungsprogramm zulegen und bin auf Elements gestossen.Das richtige Photoshop ist ja viel zu teuer und Geld verdienen möchte ich nicht mit dem Programm :-) Jedoch fehlen mir ein paar Informationen. Ic