Here you can find the source of setDebugBorder(final JComponent component)
public static void setDebugBorder(final JComponent component)
//package com.java2s; //License from project: Open Source License import java.awt.Color; import java.awt.GradientPaint; import java.awt.Paint; import javax.swing.BorderFactory; import javax.swing.JComponent; public class Main { private static final Paint debugBorderPaint = new GradientPaint(0, 0, Color.red, 100, 100, Color.white, true); public static void setDebugBorder(final JComponent component) { component.setBorder(BorderFactory.createDashedBorder(debugBorderPaint)); }/*from ww w .j av a2 s . c o m*/ }