private static Icon createMinimizeIcon(Image image){
  Graphics g=image.getGraphics();
  g.setColor(Color.BLACK);
  g.fillRect(1,TITLEBAR_HEIGHT - 3,TITLEBAR_HEIGHT - 2,2);
  return new ImageIcon(image);
}

private static Icon createMinimizeIcon ( Image image ) { Graphics g = image . getGraphics ( ) ; g . setColor ( Color . BLACK ) ; g . fillRect ( 1 , TITLEBAR_HEIGHT - 3 , TITLEBAR_HEIGHT - 2 , 2 ) ; return new ImageIcon ( image ) ; }
draw the minimize button icon .
