예제 #1
0
 public HtmlRendererContext open(
     URL url, String windowName, String windowFeatures, boolean replace) {
   TestFrame frame = new TestFrame("Cobra Test Tool");
   frame.setSize(600, 400);
   frame.setExtendedState(TestFrame.NORMAL);
   frame.setVisible(true);
   HtmlRendererContext ctx = frame.getHtmlRendererContext();
   ctx.setOpener(this);
   frame.navigate(url.toExternalForm());
   return ctx;
 }
  private void createGUI() {

    parent = new CustomFrame();
    parent.setTitle("Parent");
    parent.setLocation(50, 50);

    dialog = new CustomDialog(parent);
    dialog.setTitle("Dialog");
    dialog.setModalityType((Dialog.ModalityType) null);
    dialog.setLocation(250, 50);

    frame = new TestFrame();
    frame.setTitle("Frame");
    frame.setLocation(50, 250);

    window = new TestWindow(frame);
    window.setLocation(250, 250);

    parent.setVisible(true);
  }