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

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