Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

urgent~~howto display text in jTextArea  RSS feed

 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, i wanna to display 2 or more strings on jTextArea in different line , i hv try using insert(), it seem not working, coz it will only display in a line and overwrite each other
ie:
2 strings
- string1 = "i am a boy"
- String = "i am a girl"
expected output

code:
--------------------------------------------------------------------------------
i am a boyi am a girl
--------------------------------------------------------------------------------
what i have done is

code:
--------------------------------------------------------------------------------
ii am a girl am a boy
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
solved by append()..tq
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!