0

I have a JXTable up and running but I would like to render a column as a label or Icon. I already have the code to convert the string value into a label (with a series of icons appended together). I just need to know how to tell the table to render it as such.

Any idea?

Thanks in advance!

javydreamercsw
  • 5,363
  • 13
  • 61
  • 106
  • you might consider to explain more detailed what exactly you want to achieve (at least code snippets, better a SSCCE), then I could try to show you how that's done the SwingX'sh way :-) – kleopatra Mar 19 '12 at 09:36

1 Answers1

0

JXTable extends JTable so it's done the same way. If anyone found this just see an example here: http://www.exampledepot.com/egs/javax.swing.table/CustRend.html

javydreamercsw
  • 5,363
  • 13
  • 61
  • 106
  • actually, that's not the way you do it in SwingX rendering :-) - instead implement custom StringValue and/or IconValue and configure a DefaultTableRenderer (note: that's a SwingX renderer, not the core default) with those – kleopatra Mar 18 '12 at 15:36
  • There are many example: have a look at the demos webstartable on the project home and renderer related code in the test hierarchy. There are also some (cough ..) design arcticles in the wiki – kleopatra Mar 19 '12 at 09:33