Example usage for java.awt Dimension Dimension

List of usage examples for java.awt Dimension Dimension

Introduction

In this page you can find the example usage for java.awt Dimension Dimension.

Prototype

public Dimension(int width, int height) 

Source Link

Document

Constructs a Dimension and initializes it to the specified width and specified height.

Usage

From source file:cv.mikusher.freechart.BubbleChart.java

public BubbleChart(String s) {
    super(s);/*www .java2s . co m*/
    JPanel jpanel = createDemoPanel();
    jpanel.setPreferredSize(new Dimension(560, 370));
    setContentPane(jpanel);
    setDefaultCloseOperation(ApplicationFrame.EXIT_ON_CLOSE);
}

From source file:org.jfree.chart.demo.LineChartDemo7.java

public LineChartDemo7(String s) {
    super(s);
    JPanel jpanel = createDemoPanel();
    jpanel.setPreferredSize(new Dimension(500, 270));
    setContentPane(jpanel);
}

From source file:org.jfree.chart.demo.LineChartDemo8.java

public LineChartDemo8(String s) {
    super(s);
    JPanel jpanel = createDemoPanel();
    jpanel.setPreferredSize(new Dimension(500, 270));
    setContentPane(jpanel);
}

From source file:Main.java

public MyPanel() {
    setPreferredSize(new Dimension(200, 100));
}

From source file:TextQualityDemoVALUE_TEXT_ANTIALIAS_LCD_HBGR.java

public MyPanel(Object hintValue) {
    this.hintValue = hintValue;
    this.setPreferredSize(new Dimension(300, 100));
    String title = hintValue.toString();
    Border border = new TitledBorder(title);
    this.setBorder(border);
}

From source file:org.matsim.contrib.util.chart.ChartWindowUtils.java

public static void showFrame(JFreeChart chart, String title, int width, int height) {
    ChartFrame frame = new ChartFrame(title, chart);
    frame.setPreferredSize(new Dimension(width, height));
    SwingUtils.showWindow(frame, false);
}

From source file:org.jfree.chart.demo.DifferenceChartDemo1.java

public DifferenceChartDemo1(String s) {
    super(s);/*from www .j  a va2 s  .c o m*/
    JPanel jpanel = createDemoPanel();
    jpanel.setPreferredSize(new Dimension(500, 270));
    setContentPane(jpanel);
}

From source file:org.jfree.chart.demo.CrosshairDemo4.java

public CrosshairDemo4(String s) {
    super(s);
    JPanel jpanel = createDemoPanel();
    jpanel.setPreferredSize(new Dimension(500, 270));
    setContentPane(jpanel);
}

From source file:org.jfree.chart.demo.XYPointerAnnotationDemo1.java

public XYPointerAnnotationDemo1(String s) {
    super(s);/*from   ww w . j  a v a  2  s  .  c o m*/
    JPanel jpanel = createDemoPanel();
    jpanel.setPreferredSize(new Dimension(500, 270));
    setContentPane(jpanel);
}

From source file:JDK6TabbedPaneExample.java

public JDK6TabbedPaneExample() {

    addTabButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            add();/*from w  w w . j  a  v a2 s .  c  o  m*/

        }

    });
    closeButtonSize = new Dimension(closeXIcon.getIconWidth() + 2, closeXIcon.getIconHeight() + 2);

    frame.add(tabbedPane, BorderLayout.CENTER);
    frame.add(addTabButton, BorderLayout.SOUTH);

    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    frame.pack();
    frame.setMinimumSize(new Dimension(300, 300));
    frame.setVisible(true);

}