Package javax.swing

Examples of javax.swing.JFrame.dispose()


        // user reverts the edit
        valueModel.setValue("original value");
        assertFalse("value is not dirty, so overlay must be hidden", overlay.isVisible());

        // dispose of the frame
        frame.dispose();
    }

    protected void registerBasicServices(DefaultApplicationServices applicationServices) {
        super.registerBasicServices(applicationServices);
View Full Code Here


    });
   
    btnExit.addActionListener(new ActionListener(){

      public void actionPerformed(ActionEvent arg0) {
        newFrame.dispose();
      }
     
    });
   
    barButtons.add(btnAdd);
View Full Code Here

    frame.setVisible(true);
    runServer = netPan.isServer();
    serverAddress = netPan.getServerAddress();

    // make sure this thread goes away
    frame.dispose();
  }
}
View Full Code Here

            panel.getHostComboBox().setSelectedItem(host);
       
        panel.setImg(ClipboardManager.getClipboard());
        if (panel.getImg()==null)
        {
          frame.dispose();
          return;
        }
       
        //Display the window.
        frame.pack();
View Full Code Here

        final JFrame f = createFrame(pane);
        JScrollBar verticalScrollBar = pane.getVerticalScrollBar();
        BasicScrollBarUI basicScrollBarUI = ((BasicScrollBarUI) verticalScrollBar.getUI());
        assertEquals(basicScrollBarUI.getPreferredSize(verticalScrollBar), basicScrollBarUI
                .preferredLayoutSize(verticalScrollBar));
        f.dispose();
    }

    public void testGetMinimumSize() throws Exception {
        JLabel label = new JLabel();
        label.setPreferredSize(new Dimension(500, 600));
View Full Code Here

            checkIsCloseTo(17, basicScrollBarUI.getMinimumSize(bar).width);
            checkIsCloseTo(45, basicScrollBarUI.getMinimumSize(bar).height);
        } else {
            assertEquals(new Dimension(15, 55), basicScrollBarUI.getMinimumSize(bar));
        }
        f.dispose();
    }

    public void testGetMaximumSize() throws Exception {
        JLabel label = new JLabel();
        label.setPreferredSize(new Dimension(500, 600));
View Full Code Here

        final JFrame f = createFrame(pane);
        JScrollBar verticalScrollBar = pane.getVerticalScrollBar();
        BasicScrollBarUI basicScrollBarUI = ((BasicScrollBarUI) verticalScrollBar.getUI());
        assertEquals(new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE), basicScrollBarUI
                .getMaximumSize(bar));
        f.dispose();
    }

    public void testCreateDecreaseButton() throws Exception {
        final JButton b = barUI.createDecreaseButton(SwingConstants.VERTICAL);
        assertTrue(b instanceof BasicArrowButton);
View Full Code Here

        pane.setPreferredSize(new Dimension(120, 120));
        final JFrame f = createFrame(pane);
        JScrollBar verticalScrollBar = pane.getVerticalScrollBar();
        BasicScrollBarUI basicScrollBarUI = ((BasicScrollBarUI) verticalScrollBar.getUI());
        assertEquals(new Dimension(4096, 4096), basicScrollBarUI.getMaximumThumbSize());
        f.dispose();
    }

    public void testCreateArrowButtonListener() throws Exception {
        assertNotNull(barUI.createArrowButtonListener());
        assertFalse(barUI.createArrowButtonListener() == barUI.createArrowButtonListener());
View Full Code Here

        SwingWaitTestCase.isRealized(f);
        checkIsCloseTo(0, basicScrollBarUI.incrButton.getBounds().x);
        checkIsCloseTo(85, basicScrollBarUI.incrButton.getBounds().y);
        checkIsCloseTo(16, basicScrollBarUI.incrButton.getBounds().width);
        checkIsCloseTo(16, basicScrollBarUI.incrButton.getBounds().height);
        f.dispose();
    }

    public void testConfigureScrollBarColors() {
  try {           
            new BasicScrollBarUI().configureScrollBarColors();
View Full Code Here

      sb.open(url);
      WindowCloser.windows++;
  } else if(command.equals("close")) {
      JFrame cont = browser.frame;
      cont.setVisible(false);
      cont.dispose();
      WindowCloser.windows--;
      if (WindowCloser.windows < 0)
    System.exit(0);
  } else if(command.equals("quit")) {
      JFrame cont = browser.frame;
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.