List of usage examples for javax.swing BorderFactory createStrokeBorder
public static Border createStrokeBorder(BasicStroke stroke, Paint paint)
From source file:Main.java
public Main(String name) { getContentPane().setLayout(new FlowLayout()); JLabel labelTwo = new JLabel("www.java2s.com"); labelTwo.setBorder(BorderFactory.createStrokeBorder(new BasicStroke(0), Color.red)); add(labelTwo);/* w w w .j a v a 2 s.c o m*/ }