\r
pg.flush();\r
pg.close();\r
- }\r
+ }\r
+ catch (OutOfMemoryError err)\r
+ {\r
+ System.out.println("########################\n"\r
+ + "OUT OF MEMORY " + epsFile + "\n"\r
+ + "########################");\r
+\r
+ JOptionPane.showInternalMessageDialog(Desktop.desktop,\r
+ "Out of memory creating EPS file!!"\r
+ +\r
+ "\nSee help files for increasing Java Virtual Machine memory."\r
+ , "Out of memory",\r
+ JOptionPane.WARNING_MESSAGE);\r
+ System.out.println("Create EPS: " + err);\r
+ System.gc();\r
+ }\r
catch (Exception ex)\r
{\r
ex.printStackTrace();\r
ImageIO.write(bi, "png", out);\r
out.close();\r
}\r
- catch(OutOfMemoryError err)\r
+ catch (OutOfMemoryError err)\r
{\r
System.out.println("########################\n"\r
- +"OUT OF MEMORY "+pngFile+"\n"\r
- +"########################");\r
+ + "OUT OF MEMORY " + pngFile + "\n"\r
+ + "########################");\r
+\r
+ JOptionPane.showInternalMessageDialog(Desktop.desktop,\r
+ "Out of memory creating PNG!!"\r
+ +\r
+ "\nSee help files for increasing Java Virtual Machine memory."\r
+ , "Out of memory",\r
+ JOptionPane.WARNING_MESSAGE);\r
+ System.out.println("Create PNG: " + err);\r
System.gc();\r
+\r
}\r
catch (Exception ex)\r
{\r