Package javax.swing

Examples of javax.swing.JWindow.pack()


        }
      }
    });
    comboBox.setSelectedIndex(2);

    palette.pack();
    palette.setLocationRelativeTo(null);
   
    demo.addComponentListener(new ComponentAdapter() {
      @Override
      public void componentMoved(ComponentEvent e) {
View Full Code Here


       
        SwingUtilities.invokeAndWait(new Runnable() { public void run() {
            background.pack();
            background.setSize(new Dimension(W, H));
            background.setVisible(true);
            transparent.pack();
            transparent.setSize(new Dimension(W, H));
            transparent.setVisible(true);
            transparent.toFront();
        }});
       
View Full Code Here

    final JWindow w = new JWindow(root);
    w.getContentPane().add(new JLabel(getName()));
    final Rectangle mask = new Rectangle(0, 0, 10, 10);
    SwingUtilities.invokeAndWait(new Runnable() {
      public void run() {
        w.pack();
        WindowUtils.setWindowMask(w, mask);
        w.setVisible(true);
      }
    });
    try {
View Full Code Here

    // Note: Font rendering context is needed for character shapes, so show legend entry on screen
   
    JWindow w = new JWindow();
    w.getContentPane().add(legendEntry);
    w.setVisible(true);
    w.pack();
   
    Mockito.when(mockPlotLine.getPointIcon()).thenReturn(mockIcon);
    int i = 0;
    for (boolean b : new boolean[]{false, true}) {
      Mockito.verify(mockPlotLine, Mockito.times(i)).setPointIcon(Mockito.<Icon>any());
View Full Code Here

        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

                                                                  5));
        splashPicAndText.add(m_aboutPic, BorderLayout.CENTER);
        splashPicAndText.add(m_aboutText, BorderLayout.SOUTH);
        JWindow splashScreen = new JWindow();
        splashScreen.getContentPane().add(splashPicAndText);
        splashScreen.pack();
        int xSize = splashScreen.getWidth();
        int ySize = splashScreen.getHeight();
        Dimension screenSize = getToolkit().getScreenSize();
        int xLoc = screenSize.width / 2 - xSize / 2;
        int yLoc = screenSize.height / 2 - ySize / 2;
View Full Code Here

        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

        createContentPane(w);
        sizeHandler.setPreferredSize(w);
        installWindowListener(w);
        installResizer(w);
        w.setFocusableWindowState(focusable);
        w.pack();
        sizeHandler.enforceLimits(w);
        return w;
    }

    private void installWindowListener(JWindow w) {
View Full Code Here

            public void windowOpened(WindowEvent e) {
                setInitialDisplayState();
            }
        });
        popup.setFocusableWindowState(false);
        popup.pack();
        return popup;
    }

    private void setInitialDisplayState() {
        EventQueue.invokeLater(new Runnable() {
View Full Code Here

          RenderingEngine<CyNetwork> re = renderingEngineFactory.createRenderingEngine(panel, clusterView);

          vs.apply(clusterView);
          clusterView.fitContent();
          clusterView.updateView();
          window.pack();
          window.repaint();

          re.createImage(width, height);
          re.printCanvas(g);
          g.dispose();
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.