1 7 8 package org.jdesktop.swing.actions; 9 10 22 class Debug { 23 24 public static boolean debug = false; 25 26 public static void setDebug(boolean isdebug) { 27 debug = isdebug; 28 } 29 30 public static boolean isDebug() { 31 return debug; 32 } 33 34 38 public static void printException(String message, Exception ex) { 39 System.out.println("Exception encountered: " + message); 40 if (isDebug()) { 41 ex.printStackTrace(); 42 } 43 } 44 } 45 | Popular Tags |