Here you can find the source of lineBorder(JComponent comp)
public static void lineBorder(JComponent comp)
//package com.java2s; //License from project: Apache License import java.awt.*; import javax.swing.*; public class Main { public static void lineBorder(JComponent comp) { comp.setBorder(BorderFactory.createLineBorder(Color.BLUE)); }// ww w .j a va2s . c o m }