List of usage examples for javax.swing JPanel setPreferredSize
@BeanProperty(preferred = true, description = "The preferred size of the component.") public void setPreferredSize(Dimension preferredSize)
From source file:org.jfree.chart.demo.StackedXYBarChartDemo2.java
public StackedXYBarChartDemo2(String s) { super(s);// w w w . j a v a2 s.co m JPanel jpanel = createDemoPanel(); jpanel.setPreferredSize(new Dimension(500, 270)); setContentPane(jpanel); }
From source file:org.jfree.chart.demo.XYBlockChartDemo3.java
public XYBlockChartDemo3(String s) { super(s);//from w w w . 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.XYTaskDatasetDemo2.java
public XYTaskDatasetDemo2(String s) { super(s);//from ww w .ja va 2 s . c om JPanel jpanel = createDemoPanel(); jpanel.setPreferredSize(new Dimension(500, 300)); setContentPane(jpanel); }
From source file:jprobix.ui.SPlotFinal.java
public SPlotFinal() { super();//from w ww . j a va 2s .c om JPanel jpanel = creteDemoPanel(); jpanel.setPreferredSize(new Dimension(640, 480)); add(jpanel); }
From source file:MainClass.java
MainClass(String title) { super(title); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JToolBar toolBar = new JToolBar(); Action a = new AbstractAction("Demo") { public void actionPerformed(ActionEvent e) { System.out.println("Action taken."); }/*w w w . j av a 2 s .c o m*/ }; JButton b = toolBar.add(a); b.setText("Demo Button"); b.setToolTipText("Press me to take action."); JMenu mainMenu = new JMenu("Menu"); JMenuItem mi = mainMenu.add(a); mi.getAccessibleContext().setAccessibleName("Menu item"); JMenuBar mb = new JMenuBar(); mb.add(mainMenu); setJMenuBar(mb); JPanel pane = new JPanel(); pane.setLayout(new BorderLayout()); pane.setPreferredSize(new Dimension(200, 100)); pane.add(toolBar, BorderLayout.NORTH); setContentPane(pane); pack(); setVisible(true); }
From source file:demo.BarChartDemo11.java
/** * Creates a new demo instance.//w w w.ja v a2 s. c o m * * @param title the frame title. */ public BarChartDemo11(String title) { super(title); JPanel chartPanel = createDemoPanel(); chartPanel.setPreferredSize(new Dimension(500, 270)); setContentPane(chartPanel); }
From source file:org.jfree.chart.demo.CategoryLabelPositionsDemo1.java
public CategoryLabelPositionsDemo1(String s) { super(s);/*from ww w .j a va 2s.c o m*/ JPanel jpanel = createDemoPanel(); jpanel.setPreferredSize(new Dimension(500, 350)); setContentPane(jpanel); }
From source file:es.bsc.autonomic.powermodeller.graphics.TotalPowerVsTotalPrediction.java
public TotalPowerVsTotalPrediction(DataSet ds) { super(NAME);/*from ww w . ja va2s. c o m*/ data = dataSetToJFreeChartXYDataSet(ds); JPanel jpanel = createPanel(); jpanel.setPreferredSize(new Dimension(500, 270)); //jpanel.setPreferredSize(jpanel.getMaximumSize()); getContentPane().add(jpanel); }
From source file:org.jfree.chart.demo.GanttDemo3.java
public GanttDemo3(String s) { super(s);//from w w w. j a v a 2 s .c om JPanel jpanel = createDemoPanel(); jpanel.setPreferredSize(new Dimension(500, 370)); setContentPane(jpanel); }
From source file:aka.pirana.jdoc.JChart.java
public JChart(String title, Long callerID) { super(title); factory = Persistence.createEntityManagerFactory("jdocPU"); manager = factory.createEntityManager(); id = callerID;//from w ww.j a va2 s .c o m JPanel jpanel = createChartPanel(); jpanel.setPreferredSize(new Dimension(500, 270)); getContentPane().add(jpanel); }