List of usage examples for javax.swing BorderFactory createSoftBevelBorder
public static Border createSoftBevelBorder(int type)
From source file:Main.java
public Main(String name) { getContentPane().setLayout(new FlowLayout()); JLabel labelTwo = new JLabel("www.java2s.com"); labelTwo.setBorder(BorderFactory.createSoftBevelBorder(BevelBorder.RAISED)); add(labelTwo);/*w ww. ja v a 2 s . c om*/ }
From source file:Test.java
public Test() { this.setBounds(100, 100, 200, 100); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JPanel panel = new JPanel(); panel.setBorder(BorderFactory.createSoftBevelBorder(BevelBorder.LOWERED)); // panel.setBorder(BorderFactory.createSoftBevelBorder(BevelBorder.RAISED)); this.setLayout(new FlowLayout()); JButton exitButton = new JButton("Exit"); panel.add(exitButton);// w ww . j ava 2 s .c o m this.add(panel); exitButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent event) { System.exit(0); } }); }