Examples of pack()


Examples of java.awt.Dialog.pack()

                    ch.add("Red");
                    ch.add("Quassia");
                    ch.add("Pterodactyl");
                    d.add(ch);

                    d.pack();
                    d.setVisible(true);
                }
            });

            wb.addMouseListener(new MouseAdapter() {
View Full Code Here

Examples of java.awt.FileDialog.pack()

    System.setProperty("apple.awt.fileDialogForDirectories", "true");
    FileDialog fd = new FileDialog(GLOBAL.applet.frame, "open",
        FileDialog.LOAD);
    String currentDir = new File(".").getAbsolutePath();
    fd.setLocation(50, 50);
    fd.pack();

    fd.show();
    System.setProperty("apple.awt.fileDialogForDirectories", "false");

    if (fd.getDirectory() != null) {
View Full Code Here

Examples of java.awt.Frame.pack()

            if (!batch) {
                // Display AWT window => may run with older JVM
                final Frame f = new Frame("System Configuration Error");
                f.add(new Label("Java version 1.4 or later is required to run this program."), BorderLayout.NORTH);
                f.add(new Label("Please download it from http://java.sun.com/"), BorderLayout.SOUTH);
                f.pack();
                f.setVisible(true);
                f.addWindowListener(new WindowAdapter() {
                    public void windowClosing(WindowEvent e) {
                        synchronized (f) {
                            f.notifyAll();
View Full Code Here

Examples of java.awt.Window.pack()

     * This default implementation packs the window, if any, owner of this panel
     */
    protected void updateLayout() {
        Window w = SwingUtilities.getWindowAncestor(tfpreview);
        if (w != null) {
            w.pack();
        }
    }

    /**
     * @return Returns the currentFont.
View Full Code Here

Examples of java.util.jar.Pack200.Packer.pack()

        props.put(Packer.KEEP_FILE_ORDER, Packer.TRUE);
        props.put(Packer.UNKNOWN_ATTRIBUTE, Packer.PASS);

        final PrintStream err = new PrintStream(System.err);
        System.setErr(new PrintStream(Constants.getNullStream()));
        packer.pack(in, out);
        System.setErr(err);

        in.close();
        out.close();
View Full Code Here

Examples of javax.swing.JDialog.pack()

        }
      }
    });
    jd.getContentPane().setLayout(new BorderLayout());
    jd.getContentPane().add(new JScrollPane(ta), BorderLayout.CENTER);
    jd.pack();
    jd.setSize(400, 350);
    jd.setLocation(m_aboutPanel.getTopLevelAncestor().getLocationOnScreen().x
                   + m_aboutPanel.getTopLevelAncestor().getSize().width,
                   m_aboutPanel.getTopLevelAncestor().getLocationOnScreen().y);
    jd.setVisible(true);
View Full Code Here

Examples of javax.swing.JFrame.pack()

  public void windowClosing(WindowEvent e) {
    jf.dispose();
    System.exit(0);
  }
      });
      jf.pack();
      jf.setSize(800, 600);
      jf.setVisible(true);
    } catch (Exception ex) {
      ex.printStackTrace();
      System.err.println(ex.getMessage());
View Full Code Here

Examples of javax.swing.JInternalFrame.pack()

    final JInternalFrame frame = new JInternalFrame();
    frame.setClosable(false);
    frame.setVisible(true);
    frame.setContentPane(content);
    frame.pack();

    final JDesktopPane desktop = new JDesktopPane();
    desktop.setDoubleBuffered(false);
    desktop.add(frame);
    return desktop;
View Full Code Here

Examples of javax.swing.JPopupMenu.pack()

    // show the popup where the source component is
    if (e.getSource() instanceof Component) {
      Component comp = (Component) e.getSource();
      popup.show(comp, comp.getX(), comp.getY());
      popup.pack();
      popup.repaint();
    }
  }
      });
View Full Code Here

Examples of javax.swing.JWindow.pack()

        JWindow w = new JWindow();
        w.setBackground(Color.black);
        w.getContentPane().setBackground(Color.black);
        w.getContentPane().add(this);
        w.pack();
        w.setLocation(new Point(-1, -1));
        w.setVisible(true);
    }

    class RenderThread extends Thread {
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.