JTextArea How do I add text on a new line from Text field

I want to put each new input from the text field at the start of a new line and keep the previous entries at the start of their
own line.
I'm doing this but need help with the new line.
jTextArea1.setLineWrap(true);
jTextArea1.setWrapStyleWord(true);
jTextArea1.setEditable(false);
public void textProcess()
System.out.println(sourceref1.getSourceText());
jTextArea1.setText(jTextArea1.getText()+" "+source.getSourceText());
The above just keeps adding on the new text until I reach the word wrap limit.
Thanks

Maybe you should use the escape character. Anyway, you can consider use append(text:String) instead of getText() everytime.
Eg:
jTextArea1.append("\n"+source.getSourceText());

Similar Messages

  • HT4437 how may I add files to time capsule apart from backup files?

    how may I add files to time capsule apart from backup files?
    I'm able to perform backup (time machine). May I add pictures, texts, movies...?
    Thanks

    not sure if this is a spc. appletv question or if you posted it in the wrong forum but there is no way
    for an appletv to access files directly from an time capsule it can only! access a shared lib from itunes from a computer running and running itunes

  • How do I add or delete a quick link from Firefox's home page.

    How do I add or delete a quick link from Firefox's home page. I don't use most of the links and would like to add other quick links.

    You can change the order of the boxes on the about:newtab page and drag an item to a different slot to pin it to that position or you can remove a website by clicking the close X to block that URL.<br />
    You can drag a bookmark or history item and drop them in a slot on the about:newtab page to pin them and have your own favorites sites showing.
    Changes made manually on the about:newtab page are stored in the browser.newtabpage.pinned (default = [null]) and browser.newtabpage.blocked prefs that you can check/modify on the about:config page (Bug 791447).
    *http://kb.mozillazine.org/about:config
    See also this article about the New Tab page (about:newtab):
    *https://support.mozilla.org/kb/new-tab-page-show-hide-and-customize-top-sites

  • How can i add and configure a new AIR-LAP1142N-E-K9 Access Point to a AIR-WLC4402-12-K9 WLAN controller

    How can i add and configure a new AIR-LAP1142N-E-K9 Access Point to a AIR-WLC4402-12-K9 WLAN controller

    Thanks alot, that helped me .....
    what about option 43..i am using one wlc and the switch where wlac and APs are connected is playing the role of dhcp server used by APs as there is a dhcp pool configured.  please advise. will the command be
    option 43 hex (f104xxxxxxxxxxxx)  f104 adding to it the management ip address of the wlac in hexadecimal.
    if the ip address is 192.168.10.5  then the command will be
    option 43 hex f104c0a80a05
    please correct me if i am wrong!!!!

  • Someone stole my iPhone I have find my iPhone app but it's not working how can I add my iPhone to d app from my iPad???

    Someone stole my iPhone I have find my iPhone app but it's not working how can I add my iPhone to d app from my iPad???

    Having the app is irrelevant.
    The ONLY thing that matters is whether "Find My iPhone" was enabled on the missing device before it was lost/stolen.  If it was not enabled, there is nothing that can be done.

  • [Solved] How to: Automatically add Semicolons at end of line

    Q. Is it possible to set JDeveloper to automatically add Semicolons to the end of a line of code?
    A. "While there is nothing that does this in batch mode to all your lines, while you are writing a line you can press the CTRL+SHIFT+Enter (complete statement in the source menu) shortcut and it will complete your line for you including the semicolon." [Solved] How to: Automatically add Semicolons at end of line
    Original Message:
    I'm spoiled from using Basic and similar programming languages, adding semicolons manually is something that'll take me time to get used to
    Thanks in advance,
    Abdulla
    Tags (for search engines):
    Jdeveloper automatic semicolon
    Message was edited by:
    Abdulla

    While there is nothing that does this in batch mode to all your lines, while you are writing a line you can press the CTRL+SHIFT+Enter (complete statement in the source menu) shortcut and it will complete your line for you including the semicolon.

  • How can I add music to my itunes library from my other ipods?

    How can I add music to my itunes library from my other ipods?

    The sync is one way - computer to ipod.  The exception is itunes purchases:  File>Devices>Transfer Purchases

  • How can i add movies to my ipod  touch from my itunes account?

    how can i add movies to my ipod  touch from my itunes account?

    SYnce them to the iPod from your iTunes library.
    Go to iTunes>Help>iTunes Help>Sync your iPod.... and follow the instructions.

  • How to display text everytime  on new line

    hi
    i wana display my text everytime on new line like this
    class1
    earth & atmosphere]
    tell me what i do

    You can also code the lines one at a time:
    sprite(1).line[1] = "class1"
    sprite(1).line[2] = "earth & atmosphere]"
    Depending on the situation, this may or may not be
    preferable. I use both
    this and Mike's method on a regular basis. (Though I usually
    change the
    text on a member basis, rather than on the sprite, seems to
    work better.)

  • Read lines from text file to java prog

    how can I read lines from input file to java prog ?
    I need to read from input text file, line after line
    10x !

    If you search in THIS forum with e.g. read lines from file, you will find answers like this one:
    Hi ! This is the answer for your query. This program prints as the output itself reading line by line.......
    import java.io.*;
    public class readfromfile
    public static void main(String a[])
    if you search in THIS forum, with e.g. read lines from text file
    try{
    BufferedReader br = new BufferedReader(new FileReader(new File("readfromfile.java")));
    while(br.readLine() != null)
    System.out.println(" line read :"+br.readLine());
    }catch(Exception e)
    e.printStackTrace();
    }

  • Appending to new line in text file

    I am trying to append text to a new line to a file. I set the append parameter to true and I try to output the new line character after I write the string to the file. However it is still appending the next string to the end of the first rather than in the line below. My code is below. Can someone please help me?
    Thanks
    public static boolean WriteToFile(String nameOfFile,
    String contents)
    FileWriter myFileWriter = null;
    try
    System.out.println("Attempting to write text to = " + nameOfFile);
    myFileWriter = new FileWriter(nameOfFile,true);
    myFileWriter.write(contents);
    myFileWriter.write('\n');
    myFileWriter.close();
    return true;
    catch (Exception e)
    System.out.println("EXCEPTION thrown ");
    return false;
    }

    I am trying to append text to a new line to a file.
    I set the append parameter to true and I try to
    o output the new line character after I write the
    string to the file. However it is still appending the
    next string to the end of the first rather than in
    the line below. My code is below. Can someone please
    help me?
    Thanks
    public static boolean WriteToFile(String nameOfFile,
    String
    String
    String contents)
    FileWriter myFileWriter = null;
    try
    System.out.println("Attempting to write
    ting to write text to = " + nameOfFile);
    myFileWriter = new
    eWriter = new FileWriter(nameOfFile,true);
    myFileWriter.write('\n');
    myFileWriter.write(contents); myFileWriter.close();
    return true;
    catch (Exception e)
    System.out.println("EXCEPTION thrown ");
    return false;
    try the change what i have made in bold

  • How do I install Acrobat on my new PC from my old PC

    How do I install Acrobat on my new PC from my old PC

    You don't install from your old PC.  You install from whatever resource was used to install it on your old PC.

  • How to transfer my certificate to this new account from old acount

    how to transfer my certificate to this new account from old acount

    You don't.  Registration is a one time thing that you do the first time you install an application.  Once registered it does not need to be done again.
    You should see if yoiu can have the activations reset before you try installing on a new machine so that you still have the two activations that are available to you.  If not, you should still have an activation available for use with the new installation.
    To reset activations contact Adobe Support and ask them to reset your activations....  For the link below click the Still Need Help? option in the blue area at the bottom and choose the chat option...
    Serial number and activation chat support (non-CC)
    http://helpx.adobe.com/x-productkb/global/service1.html ( http://adobe.ly/1aYjbSC )
    To get it working on the new machine you just install and activate using the serial number you should already have.

  • How can I move CC to a new PC, from one I am returning to our asset team?

    I have CC installed on two PCs. So how can I move CC to a new PC, from one I am returning to our asset team?
    Howard

    You only need to sign out of it on the machine you wish to not use it on anymore.  After that, if you choose to you can uninstall it, but it is not necessary in terms of the software... maybe your asset team has issue with it remaining though.
    To get it on the new machine just install the same way you did for any others... install the Cloud manager, sign in, install the applications.

  • Noobie question: How do I add something to the display list from a non-main class?

    I know how to use addChild() within the main class to add
    something to the stage display list and have it appear on the
    screen, but how do I add something to the stage display list from
    code within another class?
    So for example say I want to add some text (myTextField) to
    the stage's display list from within NotTheMainClass' code, could
    you give an example of the necessary code?

    you must pass a reference to a display list object or create
    one that's available to your class.
    there are so many ways to do this i'm not sure how you want
    to proceed. but you can create a globally available reference to
    the stage and root timeline:

Maybe you are looking for

  • Office 2013 applications will not run as a domain users

    I have a windows 7 64-bit pc with 2013 office home and and business installed. When trying to access Office as a domain user the programs will not run. Is there a fix for this other than making the users local admins?

  • SP2013 and Project 2013 - project files open in read-only mode with no options to edit only Save As

    Hi all, Environment: SharePoint 2013 (15.0.4420.1017)  RTM Windows 8 - Project 2013 (15.0.4433.1506) 32Bit Issue details: When opening .mpp files stored within SharePoint they are opened successfully within Project 2013 however they are opened in Rea

  • How to Change Column text of Iview HCM Process Overview

    ECC Ehp4 sps7 Portal 7.01 sps7 Please Help, I am trying to globally personalize the Copy of the Iview HCM Process Overview . The column texts have titles such as Object Type and Object Key. I want to rename them Person ID etc. I was able to "Hide" so

  • How to Create Recursive Dimension Hierarchy

    Hi all i will be glade if any body know how i can create Recursive Dimension Hierarchy where the number of levels is varibel. like the Account DIM or manager Dim eg i have the follwing table EmpId Name -- MangerID where Manager id is a forign key to

  • Touchpad don't exist!

    Hi, my "HP Pavilion dv6-1014el" do not find the touchpad, it do not exist in the hardware. I used the new hardware drivers and tried those of the manufacturer but is not detected, how can I do? I use Windows 7. thanl you