Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting a row of names from the first column of Jable  RSS feed

 
Luca Rina
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ,
I have a JTable with the model " Names " , " Quantity " and " Unit " .
I'm coding a program where you get the ingredients names.
So i need to get the whole row of one column and String it all up together,
because i need to store it in mySql and i have already set it all as String.
Any idea how i can do this ?
My code are as follows :

JTable Code:


Getting the values and for storing :



This is for loop is wrong and it does not work because i have a constructor to take in Ingredients but because it is inside the loop, it cannot take it in.
Any suggestions please ? Thank you.
 
Tony Docherty
Bartender
Posts: 3264
81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So i need to get the whole row of one column

Sorry but I don't know what you mean by this.
Do you want all the values in a column or all the values in a row?

and String it all up together, because i need to store it in mySql and i have already set it all as String.

Are you saying you want to concatenate each of the values into one String and then store that String in a database. If so why doesn't your database table have separate fields for each of the values?
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!