atarw / material-ui-swing

A modern, Material Design UI for Java Swing
MIT License
653 stars 86 forks source link

Drop Shadow Isn't under Pane #69

Closed kevin closed 5 years ago

kevin commented 5 years ago

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: a34v 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()); z86j

vincenzopalazzo commented 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 ??

kevin commented 5 years ago

The shadow is on the pane instead of around it like a border should

atarw commented 5 years ago

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 :/

vincenzopalazzo commented 5 years ago

@KvnXu This could resolve your problem