• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cant get multiple row result in UI

 
Sandeep Swaminathan
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I get ouput for this program but if there are something like 10 row I only get 1, the last result of the 10 .. what could be the problem?

 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
possibly this
TA.setText(rs.getString("EF"));

perhaps it should be
TA.append(rs.getString("EF")+"\n");

but it's only a guess - can't compile it, and too many lines to read (other than a quick glance)
 
Sandeep Swaminathan
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow! Thanks a lot! It worked .. But tell me how to introduce a scrollbar in a text area? if the data goes beyond the limit scrollbar must be enabled!
 
Maneesh Godbole
Saloon Keeper
Posts: 11096
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just wrap the text area in a JScrollPane and add the scroll pane to the container
 
Sandeep Swaminathan
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You mean to say something exactly similar to enabling scroll pane in jtable right?
 
Maneesh Godbole
Saloon Keeper
Posts: 11096
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
 
Sandeep Swaminathan
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well I do have another doubt! but since its a related one I'm posting in the same forum! I use myjTextArea.setLineWrap(true) to wrap the line and myjTextArea.setWrapStyleWord(true)
wraps the word at whitespace. The requirement is to wrap at strings.

data is in datetime format which is something like 2008-12-20 17:35:45.02008-12-20 17:36:45.0 etc

If I use setWrapStyleWord(true) it gives me
2008-12-08
17:35:45.02008-12-20
17:36:45.0 etc

How to specify wrap like this

2008-12-20 17:35:45.0
2008-12-20 17:36:45.0
etc???
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic