-1

I have an undecorated JFrame

here

and I dont like the fact that it doesnt have a drop-shadow like a decorated jframe. I want to put a dropshadow on it.

mKorbel
  • 109,525
  • 20
  • 134
  • 319
Plixel
  • 1
  • 4

1 Answers1

0

That would be the Border of the JFrame. The Border is different for the platform that you are using. Read up on How to user borders

You might be able to use an existing Border or if you wn the full effect of the shadow you will likely need to implement your own custom Border. Does a JInternalFrame have a Border like that? If so then maybe you can use:

Border border = UIManagerDefaults.getBorder("InternalFrame.border");

Original answer, comment #4

Jiri Tousek
  • 12,211
  • 5
  • 29
  • 43
Deepak S. Gavkar
  • 447
  • 8
  • 21
  • Thank you, but my frame already has a border, so replacing my current border isn't an option. – Plixel Aug 07 '13 at 08:44
  • Put all your frame contents inside a `JPanel`, add this `JPanel` containing all the components to the `JFrame`. Set the border of the `JPanel` to the border your frame currently has, then set the `JFrame`'s border to the shadowed border. This should allow you to have two borders. – Tim Visée Nov 23 '13 at 17:13