1 package com.calipso.reportgenerator.userinterface.dinamicchart; 2 3 import javax.swing.*; 4 import java.awt.*; 5 6 9 public class ChartPivotFrame extends JFrame{ 10 private ChartPivotTable chartPivotTable; 11 12 private JPanel mainPanel; 13 14 15 public void show(ChartPivotTable chartPivotTable){ 16 this.chartPivotTable = chartPivotTable; 17 getMainPanel().add(chartPivotTable); 18 init(); 19 pack(); 20 super.setVisible(true); 21 } 22 23 private void init() { 24 java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize(); 25 this.setSize(screenSize); 26 } 27 28 public JPanel getMainPanel() { 29 if (mainPanel==null){ 30 mainPanel = new JPanel(); 31 mainPanel.setLayout(new GridLayout(1, 1)); 32 getContentPane().add(mainPanel); 33 } 34 return mainPanel; 35 } 36 } 37 | Popular Tags |