How can i get rid of this problem. How to create multiple thread objects?
public void filterControl (int threadCount) {
this.rowCount = img.getHeight() / threadCount;
Thread[] t = null;
for (int i=0; i<threadCount; i++) {
t[i] = new Thread(new Runnable(){ //there is a NullPointerException
@Override
public void run() {
filtering(startRow, rowCount);
}
});
t[i].run();
}
}