aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes CellEditor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply locked New topic
Author

CellEditor

Prashanth Bhanu
Ranch Hand

Joined: Sep 25, 2003
Posts: 110
Hi Brian,

Well thanks for the link.Thanks to Gregg as well.Wlll,I've understood editer and renderer to large extent.By using renderer i managed to achive what i wanted on a JTable.
Now I have a Java class which would create me a specific JButton and will return that created JButton upon calling a method which is inside that class.
Now i have another class where i'm having a JTable and i want to add a JButton which is obtained from the above class to this Jtable.But i cant do some thing like
Jtable.getColumnModel().getColumn(2).setEditer(editor)
Because all the button which will sit in subsequent cells will be having different label on them ex:new JButton("Gregg"),
new JButton("Cole") etc..
So i'm having difficulty to incorporate this.Can you please suggest me to use this Button as Editor to my particular colums cells in the Jtable.

Thanks in advance

Prashanth
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

Seems like you meant to put this response in this thread rather than starting a new thread all together. I am closing this one and will copy your response to the new one.


GenRocket - A Test Data Generation Platform
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: CellEditor
 
Similar Threads
JTable selected row problem
JTable ........
Using cell editors in JTable
JTable +JComboBox
HyperLink but not URL!!