Package javax.swing

Examples of javax.swing.JFrame.pack()


           for (int k=0; k<categories.length; k++)
            data.setValue(categories[k], new Double(values[k]));
         JFreeChart pieChart = ChartFactory.createPieChart(pieChartName, data, false, false, false);
         pieChart.setTitle("Category Plot "+pieChartName);
         JFrame pieFrame = new ChartFrame(pieChartName, pieChart);
         pieFrame.pack();
         pieFrame.setVisible(true);
         if (currentPlot != null) {
             currentPlot.m_chart = pieChart;
         }
        
View Full Code Here


    addGrid(panel, fStatusLine,    0, 9, 2, GridBagConstraints.HORIZONTAL,   1.0, GridBagConstraints.CENTER);
    addGrid(panel, fQuitButton,    2, 9, 1, GridBagConstraints.HORIZONTAL,   0.0, GridBagConstraints.CENTER);

    frame.setContentPane(panel);
    frame.pack();
    frame.setLocation(200, 200);
    return frame;
  }

  private void addGrid(JPanel p, Component co, int x, int y, int w, int fill, double wx, int anchor) {
View Full Code Here

            {
                stop();
            }
        } );

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


    public void actionPerformed( ActionEvent e )
View Full Code Here

    UserInterface newContentPane = new UserInterface();
    newContentPane.setOpaque(true); // content panes must be opaque
    frame.setContentPane(newContentPane);

    // Display the window.
    frame.pack();
    frame.setVisible(true);
  }

  public static void main(String[] args) {
    // Schedule a job for the event-dispatching thread:
View Full Code Here

       
       
        frame.setPreferredSize(calculateOptimalAppSize(1200, 850));
        ImageIcon icon = new ImageIcon(EcSwingXMain.class.getResource(iconLocation));
        frame.setIconImage(icon.getImage());
        frame.pack();
        frame.setLocationRelativeTo(null);
       
        frame.setExtendedState(getOptimalExtendedState(frame));
       
       
View Full Code Here

        final JProgressBar updateProgress = new JProgressBar(0, 100);
        updateProgress.setValue(0);
        updateProgress.setStringPainted(true);
        updateFrame.add(updateProgress);
        updateFrame.setPreferredSize(new Dimension(200, 100));
        updateFrame.pack();
        updateFrame.setLocationRelativeTo(null);
        updateFrame.setVisible(true);
        ecUpdater.addPropertyChangeListener(new PropertyChangeListener()
        {
          public void propertyChange(PropertyChangeEvent evt)
View Full Code Here

      });

//    Following does not compile on JDK 1.3.1
//    f.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    f.getContentPane().add(p);
    f.pack();
    f.setVisible(true);
  }
 
  public void updateColors() {
    tableModel.getDataVector().clear();
View Full Code Here

                try {
                    final ClientGUI gui = new ClientGUI(client);
                    final JFrame frame = new JFrame(title);
                    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                    frame.getContentPane().add(gui, BorderLayout.CENTER);
                    frame.pack();
                    frame.setVisible(true);
                } catch (final Exception ex) {
                    // if console is visible, print error so that
                    // the stack trace remains visible after error dialog is
                    // closed
View Full Code Here

    JScrollPane scrollPane = new JScrollPane(vv);
   
   
    frame.getContentPane().add(scrollPane);
    frame.pack();
  }
}
View Full Code Here

        rl.setBackground(JBColor.ORANGE);
        rl.setOpaque(true);
        rl.setDirection(Direction.VERTICAL_DOWN);
        f.add(rl);
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.pack();
        f.setVisible(true);
      }
    });
  }
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.