Closed kevin closed 5 years ago
Hello @KvnXu,
I am away from home during this time and I cannot see your problem before Wednesday evening. But I have a question for you, what is the effect you want to get by adding that code ??
The shadow is on the pane instead of around it like a border should
There isn't much you can do about that unfortunately. As far as I can tell swing doesn't really support translucent borders as it reserves a "box" for that component including the border so it's impossible for the shadow to overlap with another component in the way you want.
I suggest changing the background colour of the drop shadow to match the gradient but other than that there isn't much else you can do :/
@KvnXu This could resolve your problem
I am using this code:
contentPane.setBorder(new DropShadowBorder(new Color(0, 0, 0), 1, 5, .3f, 12, false, false, true, false));
Which results in this issue: Note that the shadow sits on the pane and not under it like a border should. I get the same issue when using:contentPane.setBorder(new DropShadowBorder());