Here you can find the source of removeBorder(JComponent component)
public static void removeBorder(JComponent component)
//package com.java2s; //License from project: Apache License import javax.swing.BorderFactory; import javax.swing.JComponent; public class Main { public static void removeBorder(JComponent component) { component.setBorder(BorderFactory.createEmptyBorder()); }/*from w ww . j a v a2 s . c o m*/ }