private void makeUI() {
      this.setTitle("Image Canvas");
      this.setLayout(new BorderLayout());
      this.setSize(800, 800);
      this.addWindowListener(new WindowAdapter() {
         public void windowClosing(WindowEvent we) {
            System.exit(0);
         }
      });
     
           
      // 이미지 불러오기 버튼
     
      Panel pnl = new Panel();
    
      point = new TextField(10);
     
      pnl.set---(Color.gray);
     
     
      this.addMouseListener(new MouseAdapter()
      {
          public void mouseClicked(MouseEvent e){
              point.setText("X:"+e.getX() + "Y:" + e.getY()+",");
              int rgb = Bimg.getRGB(e.getX(), e.getY());
              point.setText(","+rgb);
          }
      });
     
     
    //프레임에 배치
      
      openButton = new Button("Load Image");
      pnl.add(openButton);
      add(point,"North");
          
      openButton.addActionListener(this);
      this.add(pnl, BorderLayout.SOUTH);
      this.setVisible(true);
     
   }



makeui안에 넣어야 rgb값을 구할수있자나

Bimg.getRGB(e.getX(), e.getY());  이부분을 쓰려고하는데 오류땜에 안되서 ㅠㅠ