• Post Reply Bookmark Topic Watch Topic
  • New Topic

Dynamic generation of POJO  RSS feed

 
K. Tsang
Bartender
Posts: 3648
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,

I am planning to start a Swing application that shows several JTables on different tabs, similar to MS Excel. I'm planning to use a single table model for all the tabs.

At first I have a GUI allowing the user to set up the columns of the JTable. Say the user enters 5 headings. Now how do I use these inputs and generate a POJO with getters and setters. And how do I know which object I'm using in the code if I don't know the object name?
 
Rob Spoor
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd go the simple way and use a Map<String,Object>.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!