public static void setGraphics(Graphics g) { try { oldG = Reflection.getPrivateValue(Graphics.class, "currentGraphics", null); } catch (Exception e) { App.getApp().handle(e); } Graphics.setCurrent(g); }
public static void resetGraphics() { Graphics.setCurrent(oldG); oldG = null; }