/* * <<<<< スライダーイベント処理登録 >>>>>> */の部分に,
AdjustmentListener al = new AdjustmentListener() { public void adjustmentValueChanged(AdjustmentEvent e) { img_ = color(bright_min,bright_max, red_min,red_max, green_min,green_max, blue_min,blue_max, w,h); repaint(); getColor(img, color, w, h); } }; bright_min.addAdjustmentListener(al); bright_max.addAdjustmentListener(al); red_min.addAdjustmentListener(al); red_max.addAdjustmentListener(al); green_min.addAdjustmentListener(al); green_max.addAdjustmentListener(al); blue_min.addAdjustmentListener(al); blue_max.addAdjustmentListener(al);というようにAdjustmentListner処理を登録する形で 行えばよい.