File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes SWT Table - sum one column and save all content in MySQL table. 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 "SWT Table - sum one column and save all content in MySQL table." Watch "SWT Table - sum one column and save all content in MySQL table." New topic
Author

SWT Table - sum one column and save all content in MySQL table.

Tobias Leon
Greenhorn

Joined: Apr 17, 2012
Posts: 22

Hi there everyone !!!

I want to do two things:

1. Get the sum of the column "Price".
2. Save all table's content in a MySQL table. (almost done but wrong way)

For the second issue I try this:


That code only saves the last row.

I fill my table like this:

I fill my table in a wrong way ??? What can I do ???
Thanks a lot !!!


Murphy's Law
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
SWT gets very little attention here.

I was going to direct you to the Eclipse forums, but I see you posted there a week ago.

http://www.eclipse.org/forums/index.php/m/846683/

if you still had problems after being pointed to the examples, you should have reposted there.
Tobias Leon
Greenhorn

Joined: Apr 17, 2012
Posts: 22

Thanks a lot !!! Maybe I should replace my SWT Table for a JTable.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19649
    
  18

Tobias, please BeForthrightWhenCrossPostingToOtherSites.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
Don't get me started about those stupid light bulbs.
 
subject: SWT Table - sum one column and save all content in MySQL table.
 
Similar Threads
ideas wanted on making this custom JTable cell renderer more efficient
How to replace the value in a row with previous row value if it is null or 0.
Having problem in resetting the value of JTable
2d Array problem gasprices
retrieving data from table and saving into database