Package javax.swing

Examples of javax.swing.JFrame.validate()


      try {
    JFrameFactory uiFactory = (JFrameFactory)
        uiDescriptor.getUIFactory(Thread.currentThread().getContextClassLoader());
    JFrame frame = uiFactory.getJFrame(serviceItem);

    frame.validate();
    frame.setVisible(true);
      }
      catch (Exception e) {
    e.printStackTrace();
View Full Code Here


      frame.setSize(width,height);
      frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
      frame.add(new TransferDisplay(aggregates, transfer), BorderLayout.CENTER);
      frame.setVisible(true);
      frame.revalidate();
      frame.validate();
    }
  }
 
}
View Full Code Here

    frame.setSize(width,height);
    frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    frame.add(new TransferDisplay(aggregates, transfer), BorderLayout.CENTER);
    frame.setVisible(true);
    frame.revalidate();
    frame.validate();
  }

}
View Full Code Here

    TransferDisplay td = new TransferDisplay(aggregates, transfer);
    ZoomPanHandler.installOn(td);
    frame.add(td, BorderLayout.CENTER);
    frame.setVisible(true);
    frame.revalidate();
    frame.validate();
   
    //Full Display is more fully-featured than ARDisplay. It will run the whole render loop
    //and includes zoom/pan listeners.  It is harder to use though, because it takes control
    //over the process in a more robust but somewhat opaque way.
    //Since ARPanel drives the whole rendering process, it takes the dataset, rendering strategy
View Full Code Here

    frame2.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    final AggregatingDisplay panel = new AggregatingDisplay(aggregator, transfer, dataset, r);
    frame2.add(panel, BorderLayout.CENTER);
    frame2.setVisible(true);
    frame2.revalidate();
    frame2.validate();
    SwingUtilities.invokeAndWait(new Runnable() {public void run() {panel.zoomFit();}});
  }
}
View Full Code Here

    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
   
    f.setLayout(new BorderLayout());
    f.add(new Display(ct.contours()), BorderLayout.CENTER);
    f.setSize(width+50,height+50);
    f.validate();
    f.setVisible(true);
  }
 
  public static <N extends Number>
  void renderTo(Glyphset.RandomAccess<Shape, ? extends N> contours, Graphics2D g2, int width, int height) {
View Full Code Here

  protected static void loadUI( String[] args )
  {
    JFrame frame = new JFrame();
    XApplet applet = new XApplet( args, frame );
    frame.getContentPane().add( applet );
    frame.validate();
  }

  /**
   * A default constructor. Most of the setup work is actually done by the initialize
   * method and is called by the main method or the init method depending on
View Full Code Here

        JFrame frame = new JFrame("JTableDemo: " + document.getName());
        frame.setSize(300, 300);
        frame.setLocation(100, 100);
        frame.getContentPane().add(new JScrollPane(table));
        frame.validate();
        frame.setVisible(true);
    }

}
View Full Code Here

        JFrame frame = new JFrame("JTreeDemo: " + document.getName());
        frame.setSize(300, 300);
        frame.setLocation(100, 100);
        frame.getContentPane().add(new JScrollPane(tree));
        frame.validate();
        frame.setVisible(true);
    }

}
View Full Code Here

        JFrame frame = new JFrame("JTableTool: " + document.getName());
        frame.setSize(300, 300);
        frame.setLocation(100, 100);
        frame.getContentPane().add(new JScrollPane(table));
        frame.validate();
        frame.setVisible(true);
    }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.