• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need to create customize row renderer for JTable

 
Mahesh Kedari
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Rob Camick
Ranch Hand
Posts: 2613
9
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic