|
@@ -9,7 +9,7 @@ import javax.swing.ImageIcon;
|
|
|
|
|
|
public class Util {
|
|
public class Util {
|
|
|
|
|
|
- private static final boolean debug=true;
|
|
|
|
|
|
+ private static final boolean debug=false, traces=false;
|
|
|
|
|
|
static Image loadImage(Object origin, String url, int w, int h, int hints){
|
|
static Image loadImage(Object origin, String url, int w, int h, int hints){
|
|
Image o= loadImage(origin,url);
|
|
Image o= loadImage(origin,url);
|
|
@@ -25,7 +25,8 @@ public class Util {
|
|
try {
|
|
try {
|
|
return ImageIO.read(f);
|
|
return ImageIO.read(f);
|
|
} catch (IOException e) {
|
|
} catch (IOException e) {
|
|
- e.printStackTrace();
|
|
|
|
|
|
+ if(traces)e.printStackTrace();
|
|
|
|
+ if(debug)System.out.println("Using stupid ImageIcon method for "+url+".");
|
|
return new ImageIcon(url).getImage();//TODO: There is no reason this should work if everything else failed.
|
|
return new ImageIcon(url).getImage();//TODO: There is no reason this should work if everything else failed.
|
|
}
|
|
}
|
|
//return null;
|
|
//return null;
|