Is it somehow possible on Swing to set a TitledBorder transparent so that a background image shines through?
Asked
Active
Viewed 1,425 times
2
-
Thanks for the hint, got confused within my own thoughts :) – Kosi2801 Jan 25 '09 at 13:32
2 Answers
2
Found the answer.
Use the method
setOpaque(false)
on the underlying panel.

Kosi2801
- 22,222
- 13
- 38
- 45
0
Strange - TitledBorder.isBorderOpaque() supposedly returns false
, so it should already work. Maybe the problem is just that the component you're putting the border on just doesn't paint the background image over the border insets?

Michael Borgwardt
- 342,105
- 78
- 482
- 720