Package java.awt

Examples of java.awt.Frame.show()


    public static void initContext(Object owner) {
        Frame f = null;
        if (owner==null) {
            f = new Frame();
            f.setBounds(-100,-200,40,30);
            f.show();
            owner = f;
        }
        PBufferCanvasPeer.initContext(owner);
        if (f!=null) f.hide();
        else if (owner instanceof Component) {((Component)owner).repaint();};
View Full Code Here


        ScrollingImagePanel panel = new ScrollingImagePanel(image, 120, 120);

        Frame window = new Frame("JAI RandomOpImage Test");
        window.add(panel);
        window.pack();
        window.show();
    }
}
View Full Code Here

  f = new Frame("BSXDisplay Test");
  b = new BSXDisplay();
  f.add(b);
  f.pack();
  f.setResizable(false);
  f.show();

  int[][] scene = new int[3][];
  scene[0] = new int[] { 0, 0,0, 255,0, 255,255, 0,255 };
  scene[1] = new int[] { 4, 127,127, 255,255, 0,255 };
  scene[2] = new int[] { 8, 120,120, 134,120, 134, 134, 120,134 };
View Full Code Here

            try {
                frame.add(bean, BorderLayout.CENTER);
                frame.pack();
                frame.setSize(600,400);
                frame.show();
                bean.loadFromURL("private:factory/swriter", null);
                frame.validate();
                // #1
                Thread.sleep(1000);
                StringBuffer buf = new StringBuffer(1000);
View Full Code Here

        throws Exception {
        Frame wnd = new Frame();
        try {
            wnd.setSize(600, 400);
            wnd.add(new TestComponent());
            wnd.show();

            Thread.sleep(5000);

            wnd.hide();
        } finally {
View Full Code Here

    c.setBackground(Color.blue);
    c.setSize(100,100);
    add(c);
    f.add(this);
    f.pack();
    f.show();
    Point loc = f.getLocationOnScreen();
    Rectangle bounds = c.getBounds();
    Insets i = f.getInsets();
    bounds.x += i.left + loc.x;
    bounds.y += i.top + loc.y;
View Full Code Here

    a.add(c);
    a.add(l);
    c.setSize(100,100);
    f.add(a);
    f.pack();
    f.show();   
    harness.check(a.isShowing(), true);
    harness.check(c.isShowing(), true);
    harness.check(l.isShowing(), true);
    harness.check(f.isShowing(), true);
    harness.check(c.isLightweight(), true);
View Full Code Here

    Label c = new Label("label");
    c.setBackground(Color.blue);
    add(c);
    f.add(this);
    f.pack();
    f.show();
    Point loc = f.getLocationOnScreen();
    Rectangle bounds = c.getBounds();
    Insets i = f.getInsets();
    bounds.x += loc.x + i.left;
    bounds.y += loc.y + i.top;
View Full Code Here

    Frame f = new Frame();
    ScrollPane c = new ScrollPane(ScrollPane.SCROLLBARS_ALWAYS);
    add(c);
    f.add(this);
    f.pack();
    f.show();
    Rectangle bounds = c.getBounds();
    Insets i = f.getInsets();
    Point loc = f.getLocationOnScreen();
    loc.x += i.left + bounds.x;
    loc.y += i.top + bounds.y;
View Full Code Here

    Frame f = new Frame();
    Scrollbar c = new Scrollbar();
    add(c);
    f.add(this);
    f.pack();
    f.show();
    Rectangle bounds = c.getBounds();
    Insets i = f.getInsets();
    Point loc = f.getLocationOnScreen();
    loc.x += i.left + bounds.x;
    loc.y += i.top + bounds.y;
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.