public static void createDebugBorder ( JComponent c , Color color ) { if ( color == null ) { color = Color . BLACK ; } c . setBorder ( BorderFactory . createLineBorder ( color ) ) ; }
Useful debug function to place a colored line border around a component for layout management debugging .