Help me catch(java.lang.OutOfMemoryError e){}

Is it possible to catch java.lang.OutOfMemoryError in a JApplet?

The error occours here somewhere
[code]
public void run(){
for(int i=0;i<images.size();i++){
try{
mt.waitForID(i);
mc=i+1;
loadingmessage=mc+"/"+mn+" Images Completed";
System.out.println(loadingmessage);
repaint();
}
catch(Exception e){
System.out.println(e);
loadingmessage="Error Loading Image#"+i;
repaint();
break;
}

}
try{
Thread.sleep(2000);
}
catch(Exception e){
}
unblock();
}
/code]
Where to catch it?
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories