Example usage for org.jfree.ui RefineryUtilities centerFrameOnScreen

List of usage examples for org.jfree.ui RefineryUtilities centerFrameOnScreen

Introduction

In this page you can find the example usage for org.jfree.ui RefineryUtilities centerFrameOnScreen.

Prototype

public static void centerFrameOnScreen(final Window frame) 

Source Link

Document

Positions the specified frame in the middle of the screen.

Usage

From source file:Diagramas.BarChart_AWT.java

public static void main(String[] args) throws IOException {
    BarChart_AWT chart = new BarChart_AWT("Car Usage Statistics", "Which car do you like?");
    chart.pack();/*from  ww w. j  a v  a2s  .c o  m*/
    RefineryUtilities.centerFrameOnScreen(chart);
    chart.setVisible(true);

}

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

public static void main(String args[]) {
    XYStepRendererDemo1 xysteprendererdemo1 = new XYStepRendererDemo1("XYStepRenderer Demo 1");
    xysteprendererdemo1.pack();//from w  ww  .j  a v a 2 s . c o  m
    RefineryUtilities.centerFrameOnScreen(xysteprendererdemo1);
    xysteprendererdemo1.setVisible(true);
}

From source file:ttma.client.GUI.StatOperations.java

public static void main(String[] args) {
    StatOperations dem = new StatOperations("Statistique des operations reserv");
    dem.setSize(560, 367);// w  ww .ja v  a 2  s  . co  m
    RefineryUtilities.centerFrameOnScreen(dem);
    dem.setVisible(true);
}

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

public static void main(String args[]) {
    MeterChartDemo1 meterchartdemo1 = new MeterChartDemo1("Meter Chart Demo 1");
    meterchartdemo1.pack();//ww w . ja  v a  2 s  . c om
    RefineryUtilities.centerFrameOnScreen(meterchartdemo1);
    meterchartdemo1.setVisible(true);
}

From source file:org.mili.jmibs.jfree.examples.Example5.java

/**
 * @param args//from  www  .  j a  v a 2 s.co m
 */
public static void main(String[] args) {
    /* list with iterations. */
    List<Integer> il = new ArrayList<Integer>() {
        {
            add(100);
            add(1000);
            add(10000);
        }
    };

    /* list with object loadings. */
    List<Integer> ol = new ArrayList<Integer>() {
        {
            add(1000);
            add(10000);
        }
    };

    /* create the suite. */
    BenchmarkSuite bs = DefaultIterationObjectLoadBenchmarkSuite.create(il, ol);

    /* add some benches. */
    bs.addBenchmark(new ReplaceStringBenchmark());
    bs.addBenchmark(new ReplaceStringAppendBenchmark());
    bs.addBenchmark(new ReplaceStringAppendSingleBenchmark());

    /* execute the suite. */
    IterationObjectLoadBenchmarkSuiteResult bsr = (IterationObjectLoadBenchmarkSuiteResult) bs.execute();

    /* create a renderer. */
    BenchmarkSuiteResultRenderer<JFreeChart> bsrr = JFreeChartBarIterationObjectLoadBenchmarkSuiteResultRenderer
            .create();

    /* display the results. */
    ApplicationFrame af = new ApplicationFrame(bsr.getBenchmarkSuite().getName());
    ChartPanel chartPanel = new ChartPanel(bsrr.render(bsr));
    chartPanel.setFillZoomRectangle(true);
    chartPanel.setMouseZoomable(true);
    chartPanel.setPreferredSize(new Dimension(640, 480));
    af.setContentPane(chartPanel);
    af.pack();
    RefineryUtilities.centerFrameOnScreen(af);
    af.setVisible(true);
}

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

public static void main(String args[]) {
    VectorPlotDemo1 demo = new VectorPlotDemo1("JFreeChart : Vector Plot Demo 1");
    demo.pack();/*from   ww  w.  ja v a  2 s  .c  om*/
    RefineryUtilities.centerFrameOnScreen(demo);
    demo.setVisible(true);
}

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

public static void main(String args[]) {
    StackedXYAreaChartDemo1 stackedxyareachartdemo1 = new StackedXYAreaChartDemo1(
            "Stacked XY Area Chart Demo 1");
    stackedxyareachartdemo1.pack();/* w  w  w .  j  a v a2 s . c  o m*/
    RefineryUtilities.centerFrameOnScreen(stackedxyareachartdemo1);
    stackedxyareachartdemo1.setVisible(true);
}

From source file:graficarfreechart.GraficarFreeChart.java

public static void main(String[] args) {
    GraficarFreeChart chart = new GraficarFreeChart("Browser Usage Statistics", "Which Browser are you using?");
    chart.pack();/*from  w  w w .j a  va 2s .  c  o m*/
    RefineryUtilities.centerFrameOnScreen(chart);
    chart.setVisible(true);
}

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

public static void main(String args[]) {
    VectorRendererDemo1 demo = new VectorRendererDemo1("JFreeChart : VectorRendererDemo1.java");
    demo.pack();/*from   w w  w. j a v  a 2  s. c o m*/
    RefineryUtilities.centerFrameOnScreen(demo);
    demo.setVisible(true);
}

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

public static void main(String args[]) {
    SpiderWebChartDemo1 spiderwebchartdemo1 = new SpiderWebChartDemo1("SpiderWebChartDemo1");
    spiderwebchartdemo1.pack();/*w  w w .java 2s . c  o  m*/
    RefineryUtilities.centerFrameOnScreen(spiderwebchartdemo1);
    spiderwebchartdemo1.setVisible(true);
}