Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Dynamic generation of row  RSS feed

 
bhuwan tiwari
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I hasve to generate and empty row onthe click 'Enter' at the last row in table.
pl suggest me the way
bhuwan
 
eric moon
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will need to add a keyListener to your table. Listen for the VK_ENTER event, and when you see it (in the actionPerformed method), add a row to your table model, and call its fireTableStructureChanged() method. This will redraw the table.
HTH
e
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!