• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Cant get multiple row result in UI

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?

 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You mean to say something exactly similar to enabling scroll pane in jtable right?
 
Maneesh Godbole
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes
 
Sandeep Swaminathan
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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???
 
A day job? In an office? My worst nightmare! Comfort me tiny ad!
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic