BevelPanel is a drop-in replacement for the java.awt.Panel class which adds a raised or lowered etched bevel surrounding the panel contents and an optional label in the upper left of the bevel. The padding (whitespace) around the bevel can also be specified and/or changed.
BevelPanel.java
BPTest.java (this applet)
The applet below shows 6 BevelPanel's: each of the three bevel types BEVEL_NONE, BEVEL_LOWERED and BEVEL_RAISED, one each with a label and one each without.