Java tutorial
import java.awt.Color; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.border.BevelBorder; import javax.swing.border.Border; import javax.swing.border.SoftBevelBorder; public class Main { public static void main(String args[]) { JFrame frame = new JFrame("Sample Borders"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); Border softBevelBorder = new SoftBevelBorder(BevelBorder.RAISED, Color.RED, Color.RED.darker(), Color.PINK, Color.PINK.brighter()); JLabel aLabel = new JLabel("Bevel"); aLabel.setBorder(softBevelBorder); aLabel.setHorizontalAlignment(JLabel.CENTER); frame.add(aLabel); frame.setSize(400, 200); frame.setVisible(true); } }