hi All... I want to make a table in which data will be added on runtime. what actually will be done is that I will select a node from a JTree and on clicking a button I want that this object is placed in JTable provided and also there should be a JComboBox in one column which can be edited to furthur add the data and on clicking another button I want all this information. I have tried cell editor and cell renderers with no success and it is very urgent ..
This is quite difficult to answer without further information. Where exactly are you stuck? What data structures are you using to hold your objects (Collections, arrays, etc). What exactly have you tried?
Note that with JTable you don't actually add anything to the table itself - you alter the underlying data structure and then call one of the 'fire' methods such as fireTableDataChanged(). JTree is a bit different because you have to mess around with TreeNodes.
My suggestion would be to get the table adding (and removing?) working on its own; maybe adding an item each time you click a JButton. When that is done, you can think about setting up the JTree and making the two cooperate.
Just let me do the talking. Ahem ... so ... you see ... we have this tiny ad...