public static Graphics2D getGraphics() {
		Frame frame = AppWindow.getTopWindow();
		Graphics2D g2d = frame == null ? null : (Graphics2D) frame.getGraphics();

		if (g2d == null) {
			Frame[] frames = Frame.getFrames();

			for (Frame element : frames) {
				if (element.isDisplayable()) {
					g2d = (Graphics2D) element.getGraphics();
					if (g2d != null) {
						return g2d;
					}
				}
			}
			if (FALLBACK_GRAPHICS_BACKING_STORE == null) {
				FALLBACK_GRAPHICS_BACKING_STORE = new BufferedImage(32, 1, BufferedImage.TYPE_INT_ARGB);
			}
			return FALLBACK_GRAPHICS_BACKING_STORE.createGraphics();
		}
		return prepare(g2d);
	}