List of usage examples for javax.swing JInternalFrame JInternalFrame
public JInternalFrame(String title, boolean resizable)
JInternalFrame
with the specified title and resizability. 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; }