public DrawAndSaveImage() {
      Graphics2D g2d = bImage.createGraphics();
      g2d.setBackground(Color.white);
      
      //bImage = new ImageIcon("haisuli.jpg").getImage();
      g2d.clearRect(0, 0, BI_WIDTH, BI_HEIGHT);
      g2d.dispose();

      for (int r = 0; r < COLOR_DIV; r++) {
         for (int g = 0; g < COLOR_DIV; g++) {
            for (int b = 0; b < COLOR_DIV; b++) {
               Color c = new Color((r * 255) / COLOR_DIV,
                        (g * 255) / COLOR_DIV, (b * 255) / COLOR_DIV);
               colorList.add(c);
            }
         }
      }

      imageLabel = new JLabel(new ImageIcon(bImage)) {
         @Override
         protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            paintInLabel(g);
         }
      };
      MyMouseAdapter myMouseAdapter = new MyMouseAdapter();
      imageLabel.addMouseListener(myMouseAdapter);
      imageLabel.addMouseMotionListener(myMouseAdapter);
      imageLabel.setBorder(BorderFactory.createEtchedBorder());

      JButton saveImageBtn = new JButton("Save Image");
      saveImageBtn.addActionListener(new ActionListener() {
         @Override
         public void actionPerformed(ActionEvent e) {
            saveImageActionPerformed();
         }
      });

      JButton clearImageBtn = new JButton("Clear Image");
      clearImageBtn.addActionListener(new ActionListener() {
         @Override
         public void actionPerformed(ActionEvent e) {
            Graphics2D g2 = bImage.createGraphics();
            g2.setBackground(Color.white);
            g2.clearRect(0, 0, BI_WIDTH, BI_HEIGHT);
            g2.dispose();
            imageLabel.repaint();
         }
      });

      JPanel btnPanel = new JPanel();
      btnPanel.add(saveImageBtn);
      btnPanel.add(clearImageBtn);

      setLayout(new BorderLayout());
      add(imageLabel, BorderLayout.CENTER);
      add(btnPanel, BorderLayout.SOUTH);
   }