Jayashri
Jayashri

Reputation: 366

display the data of Controls Of JForm into JTable

I have made an application in which a JForm containing the JTextfields,JButtons. When I click a button I want to display the data of JTextfield in JTable. How can I do this anybody help me. I know how the data from database is displayed in JTable. Now I work with controls..

Upvotes: 1

Views: 171

Answers (1)

Luna
Luna

Reputation: 956

In the action event of jButton give,

jTable1.setValueAt(jTextField1.getText(), rowIndex,columnIndex);

Hope this may help you..

Upvotes: 2

Related Questions