posted 14 years ago
pete's solution is good, but "fixes" the gradient background i.e. the background gradient won't scroll with the text pane.
It's sufficient to setOpaque(false) and paint the text pane's background before invoking the super implementation.To the OP: note that constructing a GradientPaint is computationally expensive and you are likely to see a surge in CU use during periods of frequent repainting, or even a slowdown and flickering/jerks on an older, slow computer.
luck, db
There are no new questions, but there may be new answers.