@Override public void run() { JemmyProperties.push(); setUpJemmyProperties(); } });
/** * Displays a new {@link JFrame} with the given {@code component} and * returns an operator for it. * * @param component the component to display in the new frame. * @return An operator for the new frame which shows the given component. */ public static JFrameOperator showFrameWith(final Component component) throws InterruptedException { class Show implements Runnable { JFrame frame; @Override public void run() { frame = new JFrame(); frame.add(component); frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); frame.pack(); frame.setLocationRelativeTo(null); frame.setVisible(true); } } // Show final Show show = new Show(); runOnEdtNow(show); return new JFrameOperator(show.frame); }