next up previous contents
Next: マウス・イベント処理などの変更点 Up: メソッドの追加と変更 Previous: 変更前   目次

変更後

  public void paint(Graphics g) |  
    super.paint(g);  
    if(buffer != null} {  
      Graphics gPanel = jPanel1.getGraphics();  
      gPanel.drawImage(buffer, 0, 0, this);  
      Graphics2D g2 = (Graphics2D)jPanel1.getGraphics();  
      myDraw(g2);    // パネル内に直線を書き加える  
    }  
  }  



TKinoshita 2016-07-13