Here you can find the source of removePopupBorder(final Container c)
public static void removePopupBorder(final Container c)
//package com.java2s; //License from project: Apache License import java.awt.Container; import java.awt.EventQueue; import javax.swing.JComponent; public class Main { public static void removePopupBorder(final Container c) { EventQueue.invokeLater(() -> { Container p = c;//from w w w. j a va 2s. com while (p != null) { if (p instanceof JComponent) { ((JComponent) p).setBorder(null); } p = p.getParent(); } }); } }