Package java.awt

Examples of java.awt.Frame.validate()


      final IOfficeApplication application = OfficeApplicationRuntime.getApplication(hashMap);
      application.activate();           
      final Frame frame = new Frame();
      frame.setVisible(true);
      frame.setSize(400, 400);
      frame.validate();
      Panel panel = new Panel(new BorderLayout());
      frame.add(panel)
      panel.setVisible(true);
      frame.addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent e) {
View Full Code Here


      document.getPersistenceService().store(new FileOutputStream(file));
      document.close()
      System.out.println("Loading document for test ...");
      document = application.getDocumentService().loadDocument(officeFrame, new FileInputStream(file), new DocumentDescriptor());
      System.out.println("Document for test loaded.");
      frame.validate();
      officeFrame.getXFrame().getController().suspend(true);
      document.close();

      frame.dispose();
      document.close();
View Full Code Here

          .getApplication(hashMap);
      application.activate();
      final Frame frame = new Frame();
      frame.setVisible(true);
      frame.setSize(400, 400);
      frame.validate();
      Panel panel = new Panel(new BorderLayout());
      frame.add(panel);
      panel.setVisible(true);
      frame.addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent e) {
View Full Code Here

      System.out.println("Loading document for test ...");
      document = application.getDocumentService().loadDocument(
          officeFrame, new FileInputStream(file),
          new DocumentDescriptor());
      System.out.println("Document for test loaded.");
      frame.validate();
      officeFrame.getXFrame().getController().suspend(true);
      document.close();

      frame.dispose();
      document.close();
View Full Code Here

      officeAplication.activate();
     
      final Frame frame = new Frame();
      frame.setVisible(true);
      frame.setSize(400, 400);
      frame.validate();
      Panel panel = new Panel(new BorderLayout());
      frame.add(panel)
      panel.setVisible(true);
      frame.addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent windowEvent) {
View Full Code Here

        }       
      });
     
      IFrame officeFrame = officeAplication.getDesktopService().constructNewOfficeFrame(panel);
      officeAplication.getDocumentService().constructNewDocument(officeFrame, IDocument.WRITER, DocumentDescriptor.DEFAULT);
      frame.validate();
     
      //Now it is time to disable two commands in the frame
      officeFrame.disableDispatch(GlobalCommands.CLOSE_DOCUMENT);
      officeFrame.disableDispatch(GlobalCommands.QUIT_APPLICATION);
      officeFrame.updateDispatches();
View Full Code Here

      if (parent.isDisposed()) return;
      final Rectangle clientArea = parent.getClientArea();
      EventQueue.invokeLater(new Runnable () {
        public void run () {
          frame.setSize (clientArea.width, clientArea.height);
          frame.validate ();
        }
      });
    }
  });
  return frame;
View Full Code Here

      if (parent.isDisposed()) return;
      final Rectangle clientArea = parent.getClientArea();
      EventQueue.invokeLater(new Runnable () {
        public void run () {
          frame.setSize (clientArea.width, clientArea.height);
          frame.validate ();
        }
      });
    }
  });
  /*
 
View Full Code Here

                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);
                int i = 0;
               
View Full Code Here

                        public void run() {
                            try {

                            bean.releaseSystemWindow();
                            frame.remove(bean);
                            frame.validate();

                            } catch (Exception e) {
                                e.printStackTrace();
                            }
                           
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.