final class NewAppletViewerQuery {
// TODO test
@RunsInEDT
static @Nonnull AppletViewer showAppletViewerWith(
final @Nonnull Applet applet, final @Nonnull Map<String, String> parameters) {
final AppletViewer viewer = newViewer(applet, parameters);
execute(new GuiTask() {
@Override
protected void executeInEDT() {
viewer.pack();
viewer.setVisible(true);
}
});
pause(new Condition("new AppletViewer to be showing") {
@Override
public boolean test() {
return viewer.isShowing();
}
});
return viewer;
}