aspose file tools
The moose likes Swing / AWT / SWT / JFace and the fly likes Need to create customize row renderer for JTable Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Swing / AWT / SWT / JFace
Reply Bookmark "Need to create customize row renderer for JTable" Watch "Need to create customize row renderer for JTable" New topic
Author

Need to create customize row renderer for JTable

Mahesh Kedari
Ranch Hand

Joined: Nov 28, 2009
Posts: 91
Hi all,
I am trying to create customize row renderer for JTable.
My requirements are as below.

|------------|----------------|--------------|--------------|-----|------------|
|Category | Product ID |Description | Unit Price |Qty | Sub-Total|
|------------|----------------|--------------|--------------|-----|------------|


I have designed a combobox for category and product ID columns inside JTable. I want to put a listener on Category ID such that product IDs in selected categories will be visible in product ID drop down of selected row keeping other rows unchanged.
Column renderer is defining a class for entire column but by setting that im getting same values in all the rows for product IDs. And if I update values for one product ID dropdown, entire column data is changing.
Even im not able to put array of combobox for product ID column as number of rows are not fixed and increasing runtime.

Can anyone suggest me how can i customize Cells under particular column with JComboBox?

This message was edited 2 times. Last update was at by Mahesh Kedari


Regards,
Mahesh Kedari - Fidus Technologies Ltd.
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 1644
Cross posted: http://forums.sun.com/thread.jspa?threadID=5427297&tstart=0

Be Forthright When Cross Posting To Other Sites
 
 
subject: Need to create customize row renderer for JTable
 
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com