List of usage examples for javax.swing BorderFactory createSoftBevelBorder
public static Border createSoftBevelBorder(int type, Color highlight, Color shadow)
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, Color.red, Color.black)); add(labelTwo);/* www . j av a 2 s. c o m*/ }
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, Color.red, Color.black)); add(labelTwo);/*from w ww . jav a 2 s . co m*/ }
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, Color.lightGray, Color.yellow)); //panel.setBorder(BorderFactory.createSoftBevelBorder(BevelBorder.RAISED, // Color.lightGray, Color.yellow)); //panel.setBorder(BorderFactory.createSoftBevelBorder(BevelBorder.LOWERED, // Color.lightGray, Color.lightGray, Color.white, Color.orange)); this.setLayout(new FlowLayout()); JButton exitButton = new JButton("Exit"); panel.add(exitButton);//from w w w .j a v a2 s. com this.add(panel); exitButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent event) { System.exit(0); } }); }