BorderFactory: createLoweredBevelBorder()
import java.awt.Container;
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.border.Border;
public class MainClass {
public static void main(final String args[]) {
JFrame frame = new JFrame("Justified Titled Borders");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Border loweredBorder = BorderFactory.createLoweredBevelBorder();
JButton loweredButton = new JButton("Lowered");
loweredButton.setBorder(loweredBorder);
Container contentPane = frame.getContentPane();
contentPane.add(loweredButton);
frame.setSize(300, 200);
frame.setVisible(true);
}
}
Related examples in the same category
1. | BorderFactory: createBevelBorder(int type,Color highlight,Color shadow) | | |
2. | BorderFactory: createCompoundBorder(Border outsideBorder, Border insideBorder) | | |
3. | BorderFactory: createEtchedBorder() | | |
4. | BorderFactory: createEmptyBorder(int top,int left,int bottom,int right) | | |
5. | BorderFactory: createLineBorder(Color color) | | |
6. | BorderFactory: createLineBorder(Color color, int thickness) | | |
7. | BorderFactory: createMatteBorder(int top, int left, int bottom, int right, Color color) | | |
8. | BorderFactory: createRaisedBevelBorder() | | |
9. | BorderFactory.createTitledBorder(String text) | | |
10. | BorderFactory: createTitledBorder(Border b, String t, int j, int p) | | |