JXTable with DefaultTableCellrenderer Function and Alternate Bandwidth Separator

I updated SwingX-1.6.2, but found problems that were not shown in 1.6. The colors of JXTable cells look weird. I use an alternating alternate marker (HighlighterFactory.createAlternateStriping) for colors and a subclass of DefaultTableCellRenderer for adjusting text, font and ...

Since 1.6.1, it seems that marker colors are ignored if custom cell rendering is set. The documentation says there is a hack, but it does not work.

Does anyone have a solution for this?

+3
source share
3 answers

For custom cell rendering in SwingX

  • never subclass xxRenderer
  • never a subclass of JXTable (nor JXList, JXTree / Table)

  • / StringValue , , .
  • / Highlighter "" , , ,
  • , / HighlightPredicate
  • xxRenderer StringValue / Highlighter

Edit:

, - ComponentProvider. , (, , StringValue,... api doc), . ( JXList, JXComboBox, JXTree/Table)

+3

, JXTable , . . Row Renderering.

0

I could not reproduce the problem in SSCCE, but I solved it in my (very complex) application using the renderer inherited from SwingX DefaultTableRenderer instead of java DefaultTableCellRenderer .

0
source

All Articles