This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply locked New topic


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
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

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299

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 - Experts at Building Test Data
It is sorta covered in the JavaRanch Style Guide.
subject: CellEditor
Similar Threads
HyperLink but not URL!!
JTable selected row problem
Using cell editors in JTable
JTable +JComboBox
JTable ........