Package java.awt

Examples of java.awt.Frame.dispose()


            IStatus.ERROR,
            "Widget disposed", null)); //$NON-NLS-1$
      IFrame newOfficeFrame = officeApplication.getDesktopService().constructNewOfficeFrame(officeAWTFrame);

      if (oldOfficeAWTFrame != null)
        oldOfficeAWTFrame.dispose();
      if (oldOfficeComposite != null)
        oldOfficeComposite.dispose();

      stackLayout.topControl = officeComposite;
      baseComposite.layout();
View Full Code Here


    addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent e) {
        Frame f = (Frame) e.getSource();
        f.setVisible(false);
        f.dispose();
        // System.exit(0);
      }
    });
  }
View Full Code Here

          shell.removeListener (SWT.Deiconify, shellListener);
          shell.removeListener (SWT.Iconify, shellListener);
          parent.setVisible(false);
          EventQueue.invokeLater(new Runnable () {
            public void run () {
              frame.dispose ();
            }
          });
          break;
        case SWT.Activate:
          EventQueue.invokeLater(new Runnable () {
View Full Code Here

                    ex.printStackTrace();
                }
            }
        }
        if (!showErrors) {
            f.dispose();
        }
    }

    public Dimension getPreferredSize() {
        return new Dimension(TESTW, TESTH);
View Full Code Here

        f.setVisible(true);
        f.addWindowListener(new WindowAdapter() {
            @Override
            public void windowClosing(WindowEvent e) {
                component.done = true;
                f.dispose();
            }
            @Override
            public void windowClosed(WindowEvent e) {
                component.done = true;
            }
View Full Code Here

            lock.await();
        } catch (InterruptedException ex) {
            ex.printStackTrace();
        }
        if (args.length <= 0 || !"-show".equals(args[0])) {
            f.dispose();
        }

        if (failed) {
            throw new RuntimeException("Test FAILED.");
        }
View Full Code Here

        f.pack();
        GraphicsConfiguration gc = f.getGraphicsConfiguration();
        if (gc.getColorModel().getPixelSize() < 16) {
            System.out.printf("Bit depth: %d . Test considered passed.",
                              gc.getColorModel().getPixelSize());
            f.dispose();
            return;
        }

        BufferedImage bi =
            new BufferedImage(IMAGE_SIZE/4, IMAGE_SIZE/4,
View Full Code Here

            g.drawImage(bi, 0, 0, destVI.getWidth(), destVI.getHeight(), null);

            snapshot = destVI.getSnapshot();
        } while (destVI.contentsLost());

        f.dispose();
        int whitePixel = Color.white.getRGB();
        for (int y = 0; y < snapshot.getHeight(); y++) {
            for (int x = 0; x < snapshot.getWidth(); x++) {
                if (snapshot.getRGB(x, y) == whitePixel) {
                    System.out.printf("Found untouched pixel at %dx%d\n", x, y);
View Full Code Here

        GraphicsConfiguration gc = frame.getGraphicsConfiguration();
        if (gc.getColorModel() instanceof IndexColorModel) {
            System.out.println("IndexColorModel detected: " +
                               "test considered PASSED");
            frame.dispose();
            return;
        }

        if (!show) {
            frame.dispose();
View Full Code Here

            frame.dispose();
            return;
        }

        if (!show) {
            frame.dispose();
        }
        if (capture == null) {
            throw new RuntimeException("Failed: capture is null");
        }
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.