i have been looking at the codes by Paco.

[code]public void setImage () {
 java.awt.image.BufferedImage myImage = org.opensourcephysics.tools.ResourceLoader.getBufferedImage("./tmp3D/TEXTURES/fixed_stars.jpg");
 _view.image.setImage(myImage);
}

public void blurImage() {
   float[] matrix = {
       0.111f, 0.111f, 0.111f,
       0.111f, 0.111f, 0.111f,
       0.111f, 0.111f, 0.111f,
   };

 java.awt.image.BufferedImage sourceImage = org.opensourcephysics.tools.ResourceLoader.getBufferedImage("./tmp3D/TEXTURES/fixed_stars.jpg");
 java.awt.image.BufferedImage destImage = new java.awt.image.BufferedImage(sourceImage.getWidth(), sourceImage.getHeight(), sourceImage.getType());
 java.awt.image.BufferedImageOp op = new java.awt.image.ConvolveOp( new java.awt.image.Kernel(3, 3, matrix) );
 op.filter(sourceImage, destImage);
 _view.image.setImage(destImage);
}[/code]

but i have little clue have to add a variable to make the blur depend on a variable control by a slider.

then i go look at
http://www.huxtable.com/ip/blurring.html http://www.huxtable.com/ip/ConvolveFilter.java

so i try to add the variable as the number 400 by instead i used numbertodivide

is the code correct?

public void setImage () {
 java.awt.image.BufferedImage myImage = org.opensourcephysics.tools.ResourceLoader.getBufferedImage("./tmp3D/TEXTURES/fixed_stars.jpg");
 _view.image.setImage(myImage);
}
integer rows;
integer columns;
numbertodivide = rows*columns;

public void blurImage(integer numbertodivide) {

float[] matrix = new float[numbertodivide];
for (int i = 0; i < numbertodivide; i++)
matrix[i] = 1.0f/numbertodivide*1.0f;

//    BufferedImageOp op = new ConvolveOp( new Kernel(20, 20, matrix), ConvolveOp.EDGE_NO_OP, null );
// blurredImage = op.filter(sourceImage, destImage);
java.awt.image.BufferedImage sourceImage = org.opensourcephysics.tools.ResourceLoader.getBufferedImage("./tmp3D/TEXTURES/fixed_stars.jpg");
 java.awt.image.BufferedImage destImage = new java.awt.image.BufferedImage(sourceImage.getWidth(), sourceImage.getHeight(), sourceImage.getType());
 java.awt.image.BufferedImageOp op = new java.awt.image.ConvolveOp( new java.awt.image.Kernel(rows, columns, matrix) );
 op.filter(sourceImage, destImage);
 _view.image.setImage(destImage);
}

the error message is
C:\Users\160\Desktop\EJS_4.2_091119\EJS_4.2\workspace\output\users\sgeducation\lookang\ejs_ImageTest\ImageTest.java:167: expected
 numbertodivide = rows*columns;  // > Custom.Lib Page:7
                ^
1 error
Compilation produced an error!

any tips why error?
First attachment is orginal from Paco
Second is my working  ;D