Meaningless Drivel is fun!*
The moose likes Swing / AWT / SWT and the fly likes Cant get multiple row result in UI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Cant get multiple row result in UI" Watch "Cant get multiple row result in UI" New topic
Author

Cant get multiple row result in UI

Sandeep Swaminathan
Ranch Hand

Joined: Apr 23, 2008
Posts: 52
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?



Music is all around us. All you have to do is just LISTEN to it,
Sandeep Swaminathan
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
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

Joined: Apr 23, 2008
Posts: 52
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

Joined: Jul 26, 2007
Posts: 10167
    
    8

Just wrap the text area in a JScrollPane and add the scroll pane to the container


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Sandeep Swaminathan
Ranch Hand

Joined: Apr 23, 2008
Posts: 52
You mean to say something exactly similar to enabling scroll pane in jtable right?
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10167
    
    8

Yes
Sandeep Swaminathan
Ranch Hand

Joined: Apr 23, 2008
Posts: 52
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???
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Cant get multiple row result in UI
 
Similar Threads
ClassNotFoundException
Refresh JComboBox
Need help with insert values into access
this code not compiling! why?
run-time error HELP!