How to add a name to Jtree froma textfield

HiAll
I havea Jtree f_viewtree
I have a dialog box which contains a textfield and gets a name of group to be added in the Jtree and also a add button. when the add button is clicked
the name should added it to the Jtree.
I know there s method called setText(text)
String text = grouptext.getText();
f_viewTree.setText(text);
does anybody knows how this works????????

I would suggest tha you read the tutorial section on handling trees, in particular on the relationship between JTree and its TreeModel.That makes 2 of us. I already gave the OP that advice 1 week ago when the same question was asked:
http://forum.java.sun.com/thread.jspa?threadID=5299814
To the OP, quit multi-posting and wasting our time. You have not made any effort to post your SSCCE showing what you are attempting to do. We have no idea what your problem is. The code from the tutorial shows you how to do this. The code we post would not be any different.

Similar Messages

  • MSRV* Reports: How to add Vendor name?

    howdy gurus!
    Appreciate very much for any guidelines on how to add vendor name in MSRV* reports.
    Cheers,
    Ron

    Thanks for the inputs guys.
    So there's no technique yet to include it (similar to FBL*N and CJI3/KSB1).
    No available note also in SAPNotes.
    I already developed the Z*  report but the key user requests the possiblities in MSRV*.
    Cheers,
    Ron

  • How to add screenshot to this thread from my hard drive?

    How to add screenshot to this thread from my hard drive?

    Unfortunately there is no built in way to do this. You would need to upload the picture some where and link to it in HTML.
    (Flickr, Picasa, Drop Box, etc.)

  • How to add coloum name in a exel sheet download file?

    Dear all,
    I amdownloading a excel sheet from a internal table.I am getting all data correctly.
    but now i want to add coloumn name for each coloumn.
    How can I do it?
    i had try from work area and insert at first index but not get proper result.....
    so if possible plz suggest sampl code also.
    Regards
    Ricky

    Hi Ricky Maheswari,
                                  I will send a sample code for u.check it once.I execute the below code that is executed successfully.
    In my report u have check these things carefully "PEFORM APPEND_HEADER " and SELECT STATEMENT(I use appending table stmt there).Then ur problem will be resolved.
    code:
    *& Report  YBDC_DOWNLOAD_MM01_XLS                                      *
    *& DEVELOPER   : KIRAN KUMAR.G                                         *
    *& PURPOSE     : FETCH DATA FROM DB AND PLACE THEM IN .XLS FILE        *
    *& CREATION DT : 2/12/2007                                             *
    *& REQUEST     : ERPK900035                                            *
    *& NOTE        : MENTION PATH & MENTION FILE.XLS IN THE SELE-SCREEN    *
    REPORT  ybdc_download_mm01_xls  MESSAGE-ID zbdcmsg.
    Tables
    TABLES: mara, "General Material Data
            makt. "Material Descriptions
    Global Variables
    DATA: gv_path TYPE string. "Hold Path Selection Information
    Internal Table
    DATA : BEGIN OF gt_data OCCURS 0,
            matnr(20),   " Material Number
            mbrsh(20),   " Industry Sector
            mtart(20),   " Material Type
            meins(20),   " Base Unit Of Measure
            maktx(20),   " Material Description
           END OF gt_data.
    Selection-Screen
    SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS : p_file(90).
    SELECTION-SCREEN : END OF BLOCK b1.
    SELECTION-SCREEN : BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    SELECT-OPTIONS : s_matnr FOR mara-matnr,
                     s_mbrsh FOR mara-mbrsh,
                     s_mtart FOR mara-mtart,
                     s_maktx FOR makt-maktx,
                     s_meins FOR mara-meins.
    SELECTION-SCREEN : END OF BLOCK b2.
    Initialization
    INITIALIZATION.
      PERFORM initial.
    Placing A File In The Directory
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      PERFORM path_directory.
    START-OF-SELECTION.
    Append Some Header Information To XLS File
      PERFORM append_header.
    Fetching The Data
      PERFORM fecth_data.
    END-OF-SELECTION.
    GUI_DOWNLOAD
      PERFORM gui_download.
    *&      Form  path_directory
          text
    -->  p1        text
    <--  p2        text
    FORM path_directory .
      CALL METHOD cl_gui_frontend_services=>directory_browse
        EXPORTING
          window_title         = 'Download A File'
          initial_folder       = 'c:/'
        CHANGING
          selected_folder      = gv_path
        EXCEPTIONS
          cntl_error           = 1
          error_no_gui         = 2
          not_supported_by_gui = 3
          OTHERS               = 4.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CALL METHOD cl_gui_cfw=>flush
        EXCEPTIONS
          cntl_system_error = 1
          cntl_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.
      p_file = gv_path.
      CLEAR gv_path.
    ENDFORM.                    " path_directory
    *&      Form  fecth_data
          text
    -->  p1        text
    <--  p2        text
    FORM fecth_data .
      SELECT a~matnr
             a~mbrsh
             a~mtart
             a~meins
             b~maktx
        FROM mara AS a
       INNER JOIN makt AS b ON amatnr = bmatnr
       APPENDING  TABLE gt_data
       WHERE a~matnr IN s_matnr
       AND   a~mbrsh IN s_mbrsh
       AND   a~mtart IN s_mtart
       AND   b~maktx IN s_maktx
       AND   a~meins IN s_meins.
      IF sy-subrc = 0.
        MESSAGE s000.
      ENDIF.
    ENDFORM.                    " fecth_data
    *&      Form  gui_download
          text
    -->  p1        text
    <--  p2        text
    FORM gui_download .
      gv_path = p_file.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
       BIN_FILESIZE                  =
         filename                      = gv_path
         filetype                      = 'ASC'
       APPEND                        = ' '
         write_field_separator         = 'X'
       HEADER                        = '00'
       TRUNC_TRAILING_BLANKS         = ' '
       WRITE_LF                      = 'X'
       COL_SELECT                    = ' '
       COL_SELECT_MASK               = ' '
       DAT_MODE                      = ' '
    IMPORTING
       FILELENGTH                    =
        TABLES
         data_tab                      = gt_data
       EXCEPTIONS
         file_write_error              = 1
         no_batch                      = 2
         gui_refuse_filetransfer       = 3
         invalid_type                  = 4
         no_authority                  = 5
         unknown_error                 = 6
         header_not_allowed            = 7
         separator_not_allowed         = 8
         filesize_not_allowed          = 9
         header_too_long               = 10
         dp_error_create               = 11
         dp_error_send                 = 12
         dp_error_write                = 13
         unknown_dp_error              = 14
         access_denied                 = 15
         dp_out_of_memory              = 16
         disk_full                     = 17
         dp_timeout                    = 18
         file_not_found                = 19
         dataprovider_exception        = 20
         control_flush_error           = 21
         OTHERS                        = 22
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " gui_download
    *&      Form  append_header
          text
    -->  p1        text
    <--  p2        text
    FORM append_header .
      REFRESH : gt_data.
      CLEAR   : gt_data.
      gt_data-matnr = 'MATERIAL NUMBER'.
      gt_data-mbrsh = 'INDUSTRY SECTOR'.
      gt_data-mtart = 'MATERIAL TYPE'.
      gt_data-maktx = 'MATERIAL DESCRIPTION'.
      gt_data-meins = 'BASE UNIT OF MEASURE'.
      APPEND gt_data.
      CLEAR gt_data.
    ENDFORM.                    " append_header
    *&      Form  initial
          text
    -->  p1        text
    <--  p2        text
    FORM initial .
      s_matnr-sign   = 'I'.
      s_matnr-option = 'BT'.
      s_matnr-low    = '800'.
      s_matnr-high   = '100-200'.
      APPEND s_matnr.
      s_mbrsh-sign   = 'I'.
      s_mbrsh-option = 'BT'.
      s_mbrsh-low    = 'M'.
      s_mbrsh-high   = ''.
      APPEND s_mbrsh.
      s_mtart-sign   = 'I'.
      s_mtart-option = 'BT'.
      s_mtart-low    = 'FERT'.
      s_mtart-high   = 'HALB'.
      APPEND s_mtart.
      s_maktx-sign   = 'I'.
      s_maktx-option = 'BT'.
      s_maktx-low    = 'IRON'.
      s_maktx-high   = 'STEEL'.
      APPEND s_maktx.
      s_meins-sign   = 'I'.
      s_meins-option = 'BT'.
      s_meins-low    = 'CM'.
      s_meins-high   = 'KG'.
      APPEND s_meins.
    ENDFORM.                    " initial
    Award points if helpful.
    Kiran Kumar.G
                     Have a Nice Day..

  • How can add a name to the dictionary

    Everytime I put my daughter's name in a text msg, it suggests other spellings of her name. My crackberry let me add her name spelling to the dictionary? Does the iphone have something similar?

    Names are added by rejecting the autocorrect selection.  If you continue to tap the "x" when autocorrect suggests an alternative spelling it will eventually learn from this and stop trying to correct the spelling.

  • How to add website name to video with QTX?

    I want to add the name of my website to video clips in such a way that it will be difficult for others to copy the video, remove my website name and republish it without any credit to me. At present I am using QuickTime to 'Save for Web' and then uploading the resultant file (M4V) to my website. The videos are just video blogs so they're not high-tech productions!
    I am running Snow Leopard 10.6.7. I used to have Quicktime Player 7 Pro. I now seem to be running QuickTime Player 10.0
    I cannot find a User Guide to QTP 10. The user guide for QTP7 does refer on page 35 to adding text to a video but a) it refers to a Clipboard I can't find and the menu options don't match what I'm looking at in QTP10; and b) if I can find a way to follow these instructions, how easy will it be for someone to simply download my video file and remove the text anyway?
    I'd appreciate any help or advice you can offer.

    I am running Snow Leopard 10.6.7. I used to have Quicktime Player 7 Pro. I now seem to be running QuickTime Player 10.0... The user guide for QTP7 does refer on page 35 to adding text to a video but a) it refers to a Clipboard I can't find and the menu options
    If you had QT 7 keyed for "Pro" use when you upgraded to OS X.6, then a Snow Leopard versions of the QT 7 Pro player should have been placed in the "Applications/Utilities" folder automatically. Alternately, if you still cannot find QT 7 on your upgraded system, you could try using the free MPEG Streamclip application. In many ways it functions as a QT 7 Pro alternative for conversions, merging files, and such but does not have QT 7 Pro's layering and masking features. However, it does have a built-in text "watermarking" feature in the "Adjustments" window. I.e., instead of using the QT X "Save for Web" option, you would use the MPEG Streamclip "Export to MPEG-4" option and add your "text" watermark before actually performing the export. Alternatively, many QT 7 Pro users add a graphic watermark or logo as a means of identifying their content. If interested, here are a couple of old QT "Quickie" tutorials for adding a graphic logo/watermark:
    Adding a Graphic Logo
    Adding a Graphic Watermark
    how easy will it be for someone to simply download my video file and remove the text anyway?
    If you embed a watermark or logo before exporting your file to its final compression format for posting to your site, then it is virtually impossible to remove totally without editing each frame of your clip at the pixel level. (It would, however, be easy to cover the logo or watermark with an opaque mask.) On the other hand, if you add the logo or watermark, text or graphic, as a post export edit in its own track layer, then it is quite easy to remove it using an application like QT 7 Pro or, in rare cases, by simply copying the main audio/video tracks to a different file container type.

  • Whit PHOTO how to add a name when I expert one

    I upgrade recently Iphoto whit Photo.
    I need to export many picture. I usually add a name when I use Iphoto. But I didn't find the same option in Photo. So whit about 100 exported picture only the IMG-9999 camera name is boring.
    Tanks for any good help!
    Denis

    what exactly did you mean by adding a name?
    LN

  • How to add same name records from datagrid,while i am selecting one of the record and click add butt

    hi  friends,
    i  am doing flex 4 mxml web application with as3,i am struck up in the following  concept,shar your suggession about this.
    i am using datagrid with 3 columns NUMBER, NAME, AMOUNT. one text box and one add button and one delete button.
    i have two records in the same name in grid, when i click one record from the grid and click ADD button means that time ,both records  AMOUNT WILL ADDED   which record having the same name and give that value in a text box.
    how to do this?
    any useful suggesssion or modal sample
    Thanks in advance,
    B.venkatesan.

    hi gajanan hiroji,
    Thanks for the useful help.
    And one more think i want ask you, i am doing web application, i am using 5 modules in that,every module in a single page.
    In this application i am using datagrid in last 3 models. the operation is same for the models, select a record from grid then click post it should move to next page.
    In that i am writting init() function . this for showing the last module posted records here while i am entering this model.
    At the panel initializing time the records loading and showing in the gird,
    i written refresh function for this .
    But some times the function working properly and show the records in grid.
    some time it wont show the records.
    refresh function not working properly..
    looking for usful suggession,
    Thanks,
    B.venkatesan.

  • How to add file name by sqlldr

    Hi All,
    Can anyone kindly give me an approach to use a variable in a sql loader ctl file. I am trying to add the value before each insert of row and this value is the file name. So the question is how can I dynamically identify the input data file name, if not, is there a way I can make my SQL Loader to insert a value (file name) before each row into the table.
    my control file like below ,
    LOAD DATA
    INTO TABLE "user"."AAA_BILL"
    APPEND
    REENABLE DISABLED_CONSTRAINTS
    EXCEPTIONS "USER"."AAA_BILL"
    FIELDS TERMINATED BY '|'
    (Streamnumber ,
    MSID ,
    UserName,
    Domain,
    UserIP ,
    Correlation_ID)and the loading script as below ,
    for j in $(GetFileNames)
    do
    let i=$i+1
    sqlldr user/pass control="/u01/ctrlfile/loadBILLDtl.ctl" log=$WiMAXlog$j.log data=$WiMAXsource$j   bad=$WiMAXlog$j.bad
    GetFileNames ()
    sqlplus -s user/pass << EOF
    set echo off
    SET FEEDBACK OFF
    SET heading off
    set pagesize 50000
    select bi_file_name from dbm_bill_head where bi_file_name like 'WiMAX_%' and bi_auto_status=35  order by bi_file_name;
    EOF
    }What I am trying to accomplish here is, I want to insert the data file name along with other data in the data file into table AAA_BILL and this table has the file name coloumn, but the data file does not contain the file name as one of its contents.
    Note : my DB is 10G and OS is RHEL
    any help please ,
    Edited by: 876602 on 18/12/2011 05:44 ص

    Hi,
    Now it is working just well.
    I kept 2 variables: one with the POSIX file path for my do shell script and another one (using the provided tip here) for the Applescript function.
    The only problem I had left was that teh file was writen in, maybe, UTF8 so I added to the open for access a "as text" at the end to make the file as straith text file.
    I always found languages like Applescript a little bit hard to learn. Strangely, I have less difficulty with Cocoa!
    Thanks for avery one here!

  • How to get my Name in the From Field instead of email address?

    For an Exchange Activesync account, how do you get your friendly "Name" to show in the From: field rather than email address ([email protected])?
    I seem to be able to do this fro IMAP/POP accounts but not Exchange Activesync.
    All the discussions I've found about gmail and Activesync seem to be centered on getting your messages to show a different return email address than your exchange account. I'm not looking for this, just to show the Name.
    Thanks

    If you add a contact ("Contacts app>> "+">> enter info) with that email address, it will appear in mail with whatever name you set in the email address' contact.

  • Psexec- How to add computer name to log file.

    Hi Using this command to get serial number of machines. 
    psexec @computerslist.txt wmic bios get serialnumber >>log.txt
    Log file as:
    Serial number 
    xyz12345 
    Serial number 
    abc98765
    How can i add the computer name to co-relate to the serial number. 

    Hi,
    Do you need any other assistance? Is there any update from satyajit comments?
    Thanks.
    Dharmesh Solanki
    TechNet Community Support

  • How to add attachment to a mail from client side to an account

    hi all,
    i am using java mail api for my web-application. what i have done is that when the user submits a weekly-report form , the contents of form are mailed to a specific address acount in gmail from where i can retrieve all mails. i am able to achieve this.
    what i want now is that the user should be able to attach some file to the report-form and that file comes as attachmernt to the gmail account.
    How can i pass value to FileDataSource for filename as it looks for that in my local machine and not on client machine.
    Please help and if u can give a sample code for reference also.
    here is code snippet for jsp form and servlet for reference:-
    jsp form code is:-
    <FORM method="post" enctype="multipart/form-data" action="SendMailServlet">
    <CENTER><TABLE BORDER=0 CELLPADDING=5 WIDTH="95%" >
    <TR>
         <TD WIDTH="25%"><B>Name:</B></TD>     
         <TD WIDTH="25%"><INPUT type="text" name="name" size="20"></TD>
    </tr>
    <tr>
         <TD WIDTH="25%"><B>Comment: </B></TD>     
         <TD WIDTH="20%"><textarea cols="40" rows="4" name="comment"></textarea></TD>
    </TR>
    <tr>
         <TD WIDTH="25%"><B>Attachment: </B></TD>
         <TD WIDTH="20%"><INPUT type="file" name="file" size="20"></TD>
    </TR>
    corresponding code for servlet is:-
    MimeBodyPart p1=new MimeBodyPart();
    p1.setText( "FeedBack Sent From :- "+senderName+CR+
                   "Comment Given is :- "+comment+CR);
    //Set the attachments
    MimeBodyPart p2=new MimeBodyPart();
    FileDataSource fds=new FileDataSource(file);
    p2.setDataHandler(new DataHandler(fds));
    p2.setFileName(fds.getName());
    Multipart mp=new MimeMultipart();
    mp.addBodyPart(p1);
    mp.addBodyPart(p2);
    msg.setContent(mp);
    msg.saveChanges();
    Transport.send(msg);
    Any help in this regard will be highly useful
    thanks in advance
    rahul

    Read the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/components/list.html]How to Use Lists. It has an example of dynamically adding an item to the list. There is also a tutorial on "How to Use File Choosers" if thats your problem.
    Start with the basics and read the tutorial.

  • How to add Distribution Group email alias from CSV in office 365

    Hello Forum!
    Hope someone can help me troubleshoot this or even let me know if its not possible. But, I used powershell to import distribution groups and set primary emails in Office 365. That worked great, but we have two domains and i would like to add an email alias
    to all my DGs for the other domain.
    This was my best attempt and its not going well:
    Import-CSV "C:\distributionlists.csv" | foreach {Set-DistributionGroup "$_.Name" -EmailAddresses SMTP:$_.PrimarySmtpAddress,$SecondarySmtpAddress}
    $_.Name is the column name for my DGs. IE: DL-IT
    $_.PrimarySmtpAddress is the column name for my primary email. IE: [email protected]
    $_.SecondarySmtpAddress is the column name for my email alias. IE: [email protected]

    Hi,
    Based on my understanding, the below code should work when your manually run it:
    Set-DistributionGroup "DL-accounting"
    -EmailAddresses SMTP:<Primary Email>,<Alias Email>
    If all those distribution groups have been already created, then use set-distributiongroup command should work. How about first new those distribution group, and then run foreach block to do the loop.
    Regards,
    Yan Li
    Cataleya Li
    TechNet Community Support

  • How to prevent middle names and titles from appearing in contacts

    My iPhone is syncrhonised with MS Outlook, and I've used Outlook as my system of record for contacts for many years. I have hundreds of contacts in Outlook, many of which contain middle names and titles.
    The problem is that the iPhone displays every contact as Title FirstName MiddleName Surname Suffix. For many of my contacts, particularly when viewed in the Favourites list, I can't even see the contact's surname because the contact's title, first name and middle name(s) take up so much of the row.
    How can I stop my iPhone from displaying titles and middle names? Is there a setting somewhere in iTunes that will prevent these fields from being transferred to the iPhone?

    @NFH
    I am also experiencing this problem, but I think it started with one of the later iOS 3.x releases or possible iOS4. All of my contacts display their job title (eg. "Senior Vice President of Worldwide Sales & Operations") which given the screen real estate means that NONE of the actual Contact name is visible.
    This is only happening on my iPhone 3GS (iOS 4.0.2) and does NOT happen on my Mac, my me.com, nor on my iPad (iOS 3.2.2). Which, again leads me to believe this problem was introduced in iOS4.

  • How to add document name and document namespace to xml mail sender msg

    Hi,
    I have set up a sender mail CC that accepts messages already in XML format. However, the messages are missing the document name and document namespace. I am trying to use MessageTransformBean to add these to the message payload. However the examples I've found so far all talk about converting plain text coming in. When I used convertionTpe -> SimplePlain2XML it messed up the original content with unnecessary xml tags.
    Can someone please tell me how to insert the document name and namespace into the payload without converting the original xml content? Thanks in advance.

    Dont think there is a way.
    As the source is a XML, why dont you create the MessageType with the same name and namespace as the XML file in the email.
    Regards,
    Bhavesh

Maybe you are looking for

  • IPhone 6 Plus 64 - Facetime Problem

    I bought iPhone 6 plus few days ago in Dubai - UAE. I couldn't make facetime work. Actually I couldn't find it. Is there anyway to make it work?

  • Blending with Color Burn not working

    I have an image in which I simply duplicated the background layer and changed the Blending Mode to Color Burn and it creates a very dark and dramatic result which I love. However, when I save it back to Lightroom (or anywhere else it turns out) as a

  • Transportation Info REQ??

    Hi I want to know the versions of the object in the TR no. Is there any way to chk the latest versions of the TR's attached with an object. Is there any way to see how may different TR are attached with an single object in SAP? Also i had a TR,with t

  • Dynamic Navigation link dyntotab_10fromMainWindow  not defined

    Hi, I am trying to logon to a business role and i get a message to define the navigation link dyntotab_10fromMainWindow . While debugging, i found out that the link is generted at runtime. Please help me how to define a target for the link. PFB the t

  • No sound PE7

    Today, when I create videos, the video is fine, but there is no sound. (It worked fine yesterday). I am using mpeg files to create my video, and outputting to mpeg. Also tried outputting to avi. The sound is there OK when I'm editing the video. It's