Hey guys! I need help...
I have a text field and table that I made on NetBeans. I'm working on GUI. Anyway, in this text field, the user inputs his/her name. And the user's name is displayed on the "User 1" heading of the table:
jTable1.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{"Monday", null, null, null, null},
{"Tuesday", null, null, null, null},
{"Wednesday", null, null, null, null},
{"Thursday", null, null, null, null},
{"Friday", null, null, null, null},
{"Saturday", null, null, null, null}
},
new String [] {
"Day", "User 1", "User 2", "Free time", "Duration"
}
So, instead of seeing "User 1 " as a heading, the name is shown. I was thinking of making a method "getText" which gets the String from the text field, and passing it to the table.. But idk. Can someone please help me?