Results 1 to 4 of 4
  1. #1
    Jay-1.1 is offline Member
    Join Date
    May 2008
    Posts
    10
    Rep Power
    0

    Default [SOLVED] Text Area new line problem

    Hi, I have created an invisible text area to store my submitted details in. when I submit one thing its fine but if I submit two things it replaces the first one that i submitted do u know how I can solve this problem?

    This is the code

    Java Code:
    if(e.getSource() == btnSubmitOrder){
    
    txaSubmittedOrder.setText(txfName.getText ());
    txaSubmittedOrder.setText(txaItemSelected.getText ()); 
    txaSubmittedOrder.setBackground(Color.blue); 
    txaSubmittedOrder.setForeground(Color.black); 
    }
    Thanks
    Last edited by Jay-1.1; 05-07-2008 at 12:46 AM.

  2. #2
    hardwired's Avatar
    hardwired is offline Senior Member
    Join Date
    Jul 2007
    Posts
    1,576
    Rep Power
    9

    Default

    Java Code:
    txaSubmittedOrder.append(txfName.getText() + "\n");

  3. #3
    Jay-1.1 is offline Member
    Join Date
    May 2008
    Posts
    10
    Rep Power
    0

    Default

    Thanks for reply got it working thank you
    Last edited by Jay-1.1; 05-07-2008 at 01:15 AM.

  4. #4
    sukatoa's Avatar
    sukatoa is offline Senior Member
    Join Date
    Jan 2008
    Location
    Cebu City, Philippines
    Posts
    556
    Rep Power
    7

    Default

    Mark this thread as solved and add rep to hardwired.
    freedom exists in the world of ideas

Similar Threads

  1. Problem in Text Editor
    By mustahsan4u in forum New To Java
    Replies: 2
    Last Post: 03-26-2008, 02:34 PM
  2. Accessing Japanese characters from text area
    By princy.mat in forum Advanced Java
    Replies: 0
    Last Post: 03-08-2008, 03:11 PM
  3. Text Area problem
    By mcal in forum New To Java
    Replies: 0
    Last Post: 02-11-2008, 09:42 PM
  4. Displaying data into text area
    By abhiN in forum New To Java
    Replies: 1
    Last Post: 01-22-2008, 10:30 AM
  5. textfiled and text area to UTF-16?
    By Mr tuition in forum AWT / Swing
    Replies: 0
    Last Post: 12-04-2007, 12:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •