/** * Positions the specified frame in the middle of the screen. * * @param frame the frame to be centered on the screen. */ public static void centerFrameOnScreen(final Window frame) { positionFrameOnScreen(frame, 0.5, 0.5); }
/** * Positions the specified frame in the middle of the screen. * * @param frame the frame to be centered on the screen. */ public static void centerFrameOnScreen(final Window frame) { positionFrameOnScreen(frame, 0.5, 0.5); }
/** * Positions the specified frame in the middle of the screen. * * @param frame the frame to be centered on the screen. */ public static void centerFrameOnScreen(final Window frame) { positionFrameOnScreen(frame, 0.5, 0.5); }
/** * Positions the specified frame at a random location on the screen while ensuring that the * entire frame is visible (provided that the frame is smaller than the screen). * * @param frame the frame. */ public static void positionFrameRandomly(final Window frame) { positionFrameOnScreen(frame, Math.random(), Math.random()); }
/** * Positions the specified frame at a random location on the screen while ensuring that the * entire frame is visible (provided that the frame is smaller than the screen). * * @param frame the frame. */ public static void positionFrameRandomly(final Window frame) { positionFrameOnScreen(frame, Math.random(), Math.random()); }
/** * Positions the specified frame at a random location on the screen while ensuring that the * entire frame is visible (provided that the frame is smaller than the screen). * * @param frame the frame. */ public static void positionFrameRandomly(final Window frame) { positionFrameOnScreen(frame, Math.random(), Math.random()); }
RefineryUtilities.centerFrameOnScreen(demo); RefineryUtilities.positionFrameRandomly(demo); RefineryUtilities.positionFrameOnScreen(demo, 1, 0); if (visible) { demo.setVisible(true);
/** * Shows / updates the displayed graph. */ public void showMe() { boolean shown; synchronized(this) { shown = isShown; if (!isShown) { isShown = true; } } if(!shown) { this.pack(); RefineryUtilities.centerFrameOnScreen(this); RefineryUtilities.positionFrameRandomly(this); RefineryUtilities.positionFrameOnScreen(this, 1, 0); this.setVisible(true); } }