views:

172

answers:

2

Is it somehow possible on Swing to set a TitledBorder transparent so that a background image shines through?

+1  A: 

Found the answer.

Use the method

setOpaque(false)

on the underlying panel.

Kosi2801
A: 

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