Java BorderFactory .createLoweredSoftBevelBorder ()

Syntax

BorderFactory.createLoweredSoftBevelBorder() has the following syntax.

public static Border createLoweredSoftBevelBorder()

Example

In the following code shows how to use BorderFactory.createLoweredSoftBevelBorder() method.


import java.awt.Container;
/*from   www .j  a va 2 s  .  c o  m*/
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.border.Border;

public class Main {

  public static void main(final String args[]) {
    JFrame frame = new JFrame("Justified Titled Borders");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    Border loweredBorder = BorderFactory.createLoweredSoftBevelBorder();
    JButton loweredButton = new JButton("Lowered");
    loweredButton.setBorder(loweredBorder);

    
    Container contentPane = frame.getContentPane();
    contentPane.add(loweredButton);
    frame.setSize(300, 200);
    frame.setVisible(true);

  }
}