question: private ImageIcon addSpaceToIcon ( ImageIcon icon ) { int width = icon . getIconWidth ( ) ; int height = icon . getIconHeight ( ) ; int hspace = 3 ; BufferedImage res = new BufferedImage ( width + hspace , height , BufferedImage . TYPE_INT_ARGB ) ; Graphics g = res . getGraphics ( ) ; g . drawImage ( icon . getImage ( ) , 0 , 0 , null ) ; g . dispose ( ) ; return new ImageIcon ( res ) ; }
target:  Creates a new ImageIcon based on the given ImageIcon that has a small space on the side, so it can be displayed properly.