jtable cell to string
Basically what the title says.
I am running a Modification System,
"What would you like to search by to Modify:"
Brings up a jtable, with all data with similar names.
String SysName = JOptionPane.showInputDialog(null, "What is the System Name?", "Modify System Definition: System Name", JOptionPane.QUESTION_MESSAGE);
String SQL = "SELECT * FROM `eossysdef` WHERE SysName LIKE '%"+SysName+"%';";
This is where I am at.
How do I either click a row and get it to send to a string or each cell to a string multiple smaller strings.
Because it will go to another Panel and fill in the TextBoxes to allow a person to modify and submit.
Double posted, and in two different but wrong sections.
Read the JTable API, all the methods you need are there. And in future, post Swing related questions in the AWT/Swing section, once only.
I apologize for the double post, just was looking for an answer, or an idea. Can not seem to get one.
Also, the api is slightly confusing me, and my thinking was, this may be a beginner question, so I asked it here, than after no one responded for a period of 6 hours, I figured maybe its an advanced question.
All I am looking for Is something that will say
String CellValue = point at cell selected by mouse
Read the API documentation: a JTable has methods columnAtPoint( ... ) and rowAtPoint( ... ). Given your TableModel you should get it from there.
Originally Posted by Sno