wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes Inserting single column values of database table into multiple columns of jtable and do comparison Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Inserting single column values of database table into multiple columns of jtable and do comparison" Watch "Inserting single column values of database table into multiple columns of jtable and do comparison" New topic
Author

Inserting single column values of database table into multiple columns of jtable and do comparison

Narendra kodli
Greenhorn

Joined: Dec 24, 2011
Posts: 22
Hello all,

I am struck ed in inserting single column values of database table into multiple columns of jtable and doing comparison for selecting greater values in each row.

Is their any query that splits column values. here i am attaching the code please give me the solution.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
and what do you expect us to do with those 125 lines of code?

here's a very simple way of getting a solution to your problem:
1) create a new program
2) just a JTable in a JScrollPane in a JFrame
3) table has 2 rows, 2 columns
4) fill the 4 cells with 'comparable' data
5) hard-code some data to simulate the resultset (array, arraylist, whatever)

now try to add the hard-coded data to the table and do your comparison.

if you can't get that to work, you will have a very short/compilable/runnable
program to post. also post what it is doing vs what you want it to do
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Inserting single column values of database table into multiple columns of jtable and do comparison
 
Similar Threads
More Simplified version of the question bellow !
Newbie question... :(
How to set value in jtable fields??
Problem with comparing results in jdbc?
Display results with next and previous buttons