• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Jtable with a customerizedRender and Editor

 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,folks
I have a Jtable displaying data from database,and in some fields,like language,I attached a customerized cell render and editor,everything is fine when I started Jtable,but When I drag and drop language column to other place,the editor is fine,but the render is rendering data with a wrong way,I suppose english and french will render green,others will be red,but after drag-and-drop the column,it render right data to red.
is there any body ever had this situation or know where is the possible problem?
thanks advance!(I didn't post code because it is quite big).


 
Rancher
Posts: 3244
30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

When I drag and drop language column to other place,the editor is fine,but the render is rendering data with a wrong way



Sounds like you might be using the wrong index. JTable has the concept of model column and view column.
 
Marshal
Posts: 22446
121
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And it has methods to convert rows and columns from one to the other.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic