Package java.awt

Examples of java.awt.Frame.dispose()


          shell.removeListener (SWT.Iconify, shellListener);
          parent.setVisible(false);
          EventQueue.invokeLater(new Runnable () {
            public void run () {
              frame.getToolkit().removeAWTEventListener(awtListener);
              frame.dispose ();
            }
          });
          break;
        case SWT.Resize:
          if (Library.JAVA_VERSION >= Library.JAVA_VERSION(1, 6, 0)) {
View Full Code Here


        assertEquals("root frame ", frame1, JOptionPane.getRootFrame());
        JOptionPane.setRootFrame(frame2);
        assertEquals("root frame ", frame2, JOptionPane.getRootFrame());
        JOptionPane.setRootFrame(null);
        frame1.dispose();
        frame2.dispose();
    }

    public void testGetRootFrame() {
        Frame frame1 = JOptionPane.getRootFrame();
        frame1.add(new JPanel());
View Full Code Here

        SwingUtilities.getDeepestComponentAt(f, 10, 10);
        try {
            Thread.sleep(DEAD_LOOP_TIMEOUT);
        } catch (Exception e) {}
       
        f.dispose();
       
        assertTrue("Dead loop occured", counter[0] <= VALID_NUMBER_OF_CALLS);
    }

}
View Full Code Here

                    failed("Painting error: Move frame to back and to front.", true);
                    capturer.writeImages();
                }
            }

            coverFrame.dispose();
        }
        finally
        {
            if (f != null)
                f.dispose();
View Full Code Here

                    //                   Thread.sleep(2000);
                }
           
            } finally {
                bean.stopOOoConnection();
                frame.dispose();
            }
        }
    }

    /** Repeatedly loading a document in one and the same OOoBean instance.
View Full Code Here

      start = loader.loadClass("nu.fw.jeti.backend.Start");
      Method m = start.getMethod("remoteLoad",new Class[]{java.net.URL.class,String.class});
      m.invoke(null,new Object[]{url,path});
    }catch(Exception e){e.printStackTrace();}
    im.dispose();
    frame.dispose()
    }
}

/*
* Overrides for emacs
View Full Code Here

      switch (e.type) {
      case SWT.Dispose: {
        parent.setVisible(false);
        EventQueue.invokeLater(new Runnable () {
          public void run () {
            frame.dispose ();
          }
        });
        break;
      }
      }
View Full Code Here

    }
    finally {
      Frame f = getFrame();
      f.setVisible(false);
      f.remove(this);
      f.dispose();
    }
  }

  private boolean threadRunning=false;
  private JTextPane editor;
View Full Code Here

                isValid.setOccurred(controlled.isValid());
            }
        });
        assertTrue(isValid.isOccurred());

        f.dispose();
        isValid.reset();
        controlled.invalidate();
        assertFalse(controlled.isValid());
        SwingUtilities.invokeAndWait(new Runnable() {
            public void run() {
View Full Code Here

        waitForIdle();
        checkIsCloseTo(0, barUI.getThumbBounds().x);
        checkIsCloseTo(66, barUI.getThumbBounds().y);
        checkIsCloseTo(10, barUI.getThumbBounds().width);
        checkIsCloseTo(50, barUI.getThumbBounds().height);
        f.dispose();
    }

    public void testButtonInScrollbar() throws Exception {
        assertEquals(2, bar.getComponentCount());
    }
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.