Example usage for javax.swing JInternalFrame JInternalFrame

List of usage examples for javax.swing JInternalFrame JInternalFrame

Introduction

In this page you can find the example usage for javax.swing JInternalFrame JInternalFrame.

Prototype

public JInternalFrame(String title, boolean resizable) 

Source Link

Document

Creates a non-closable, non-maximizable, non-iconifiable JInternalFrame with the specified title and resizability.

Usage

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

/**
 * Creates an internal frame./*from w w w .  j  a  v  a2  s  .com*/
 * 
 * @return An internal frame.
 */
private JInternalFrame createFrame1() {
    final DefaultCategoryDataset dataset = new DefaultCategoryDataset();
    dataset.addValue(34.0, "Series 1", "Category 1");
    dataset.addValue(23.0, "Series 1", "Category 2");
    dataset.addValue(54.0, "Series 1", "Category 3");
    final JFreeChart chart = ChartFactory.createBarChart("Bar Chart", "Category", "Series", dataset,
            PlotOrientation.VERTICAL, true, true, false);
    final ChartPanel chartPanel = new ChartPanel(chart);
    chartPanel.setPreferredSize(new Dimension(200, 100));
    final JInternalFrame frame = new JInternalFrame("Frame 1", true);
    frame.getContentPane().add(chartPanel);
    return frame;

}

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

/**
 * Creates an internal frame.//ww w  . ja v a2 s. c  o m
 * 
 * @return An internal frame.
 */
private JInternalFrame createFrame2() {
    final XYDataset dataset1 = createDataset("Series 1", 100.0, new Minute(), 200);

    final JFreeChart chart = ChartFactory.createTimeSeriesChart("Time Series Chart", "Time of Day", "Value",
            dataset1, true, true, false);
    final ChartPanel chartPanel = new ChartPanel(chart);
    chartPanel.setPreferredSize(new Dimension(200, 100));
    final JInternalFrame frame = new JInternalFrame("Frame 2", true);
    frame.getContentPane().add(chartPanel);
    return frame;
}