Package javax.swing

Examples of javax.swing.JFrame.dispose()


    status.setText(READY);
  }

  private void doExit() {
    JFrame frame = (JFrame) getTopLevelAncestor();
    frame.dispose();
  }

  private void doPathChanged() {
    status.setText(READY);
  }
View Full Code Here


          {
            EcAutoUpdate ecUpdater = checkForUpdates();
            // Show the main window only when there are no updates
            // running
            frame.setVisible(!ecUpdater.isUpdating());
            updateFrame.dispose();
          }
        });
      }
    });
  }
View Full Code Here

      System.exit(1);
    }

    // Tear down the task location
    if(jf != null)
      jf.dispose();

    Runtime rt = Runtime.getRuntime();

    // If launching in OSX, chmod the stub
    if(command.endsWith("/JavaApplicationStub")) {
View Full Code Here

                @Override
                public void windowClosed(WindowEvent e) {
                    JFrame tmp = messageFrame;
                    setMessageFrame(null);
                    tmp.setVisible(false);
                    tmp.dispose();
                }
            });
        }
        messageTextArea.setText(message);
        messageFrame.setTitle(title);
View Full Code Here

       
        final JFrame rW = this;
        addWindowListener(new WindowAdapter() { // when dRegisterWindow is closed, open cLoginWindow, overriding the windowClosing event
            @Override
            public void windowClosing(WindowEvent evt) {
                rW.dispose();
                new cLoginWindow();
            }
        });
    }
}
View Full Code Here

        int w = f.getContentPane().getWidth();
        int h = f.getContentPane().getHeight();
        int x = f.getContentPane().getX();
        int y = f.getContentPane().getY();
        f.setVisible(false);
        f.dispose();
        // The request of sizing was 170x300, lets see if we managed that.
        harness.check((w + i.left + i.right) == 170);
        harness.check((h + i.top + i.bottom) == 300);

        // The contentPane is per definition set to 0, 0
View Full Code Here

                // fail
            } finally {
                w = f.getContentPane().getWidth();
                h = f.getContentPane().getHeight();
                f.setVisible(false);
                f.dispose();
            }
        }
        Rectangle r = (Rectangle) vars.get(0);
        harness.check(r != null);
        harness.check(w == r.getWidth());
View Full Code Here

    catch (InterruptedException ex)
      {
      }

    frame.setVisible(false);
    frame.dispose();
    frame = null;
    thread = null;
    pane = null;
    north = center = south = east = null;
  }
View Full Code Here

        h.debug(ex);
        h.fail("Unexpected BadLocationException");
      }
    Rectangle b = at.getCharacterBounds(2);
    h.check(b, expected);
    f.dispose();
  }

  private Rectangle getTextRectangle(JLabel l)
  {
    Rectangle textR = new Rectangle();
View Full Code Here

    Rectangle r = getTextRectangle(l);
    int expected = -1;
    expected = v.viewToModel(5, 5, r, new Position.Bias[0]);
    int i = at.getIndexAtPoint(new Point(5, 5));
    h.check(i, expected);
    f.dispose();
  }

  private Rectangle getTextRectangle(JLabel l)
  {
    Rectangle textR = new Rectangle();
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.