Creating and Setting an EtchedBorder from BorderFactory : EtchedBorder « Swing « Java Tutorial






import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.border.EtchedBorder;

public class Main {
  public static void main(String[] argv) {
    
    EtchedBorder etchedBorder = (EtchedBorder)BorderFactory.createEtchedBorder();
    JLabel component = new JLabel("label");
    component.setBorder(etchedBorder);

  }
}








14.106.EtchedBorder
14.106.1.EtchedBorderEtchedBorder
14.106.2.Creating EtchedBorder with its ConstructorCreating EtchedBorder with its Constructor
14.106.3.Raised and Lowered EtchedBorderRaised and Lowered EtchedBorder
14.106.4.Creating and Setting an EtchedBorder from BorderFactory