Question

I would like to highlight data in a JXTable based on the previous data in the table. The data exists in "blocks" but the number of rows in each block of data varies based on a variety of factors; what I would like to do is alternately highlight each block of data if one element/column in the block (that is consistent throughout the block) is different enough from the previous block of data.

Thoughts?

Was it helpful?

Solution

If I understand you correctly, you want something like "blocked striping" with variable block length: basically, you'll need a custom HighlightPredicate which detects the block boundaries. Recently we came up with some logic which checks all values before and such keeps track of "oddness".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top