Example usage for java.awt BorderLayout BorderLayout

List of usage examples for java.awt BorderLayout BorderLayout

Introduction

In this page you can find the example usage for java.awt BorderLayout BorderLayout.

Prototype

public BorderLayout() 

Source Link

Document

Constructs a new border layout with no gaps between components.

Usage

From source file:old.MonitoringChart.java

public MonitoringChart(String title) {
    setLayout(new BorderLayout());
    chart = createChart(title, createDataset());
    add(new ChartPanel(chart), BorderLayout.CENTER);

    new DataThread().start();
}

From source file:mls.FramePlot.java

public FramePlot() {

    seriesMedia = new XYSeries("Media campionaria (Gordon)");
    seriesVarianza = new XYSeries("Varianza campionaria (Gordon)");

    final XYSeriesCollection datasetMedia = new XYSeriesCollection(this.seriesMedia);
    final XYSeriesCollection datasetVarianza = new XYSeriesCollection(this.seriesVarianza);
    final JFreeChart chartMedia = createChartMedia(datasetMedia);
    final JFreeChart chartVarianza = createChartVarianza(datasetVarianza);

    ChartPanel chartPanelMedia = new ChartPanel(chartMedia);
    final ChartPanel chartPanelVarianza = new ChartPanel(chartVarianza);

    final JPanel content = new JPanel(new BorderLayout());
    content.add(chartPanelMedia);/*from   w  w w .j av a 2 s . c  o m*/
    content.add(chartPanelVarianza, BorderLayout.EAST);
    chartPanelMedia.setPreferredSize(new java.awt.Dimension(500, 270));
    chartPanelVarianza.setPreferredSize(new java.awt.Dimension(500, 270));
    add(content);
    //setContentPane(content);
}

From source file:fuel.gui.stats.PieChartPanel.java

public PieChartPanel(DefaultPieDataset pieDataset, String message) {
    JFreeChart pieChart = ChartFactory.createPieChart3D("", pieDataset, true, true, false);
    PiePlot3D plot1 = (PiePlot3D) pieChart.getPlot();
    plot1.setForegroundAlpha(0.6f);/*from www  . jav a  2s .c o m*/
    //plot3.setCircular(true);

    ChartPanel barChartPanel = new ChartPanel(pieChart);
    barChartPanel.getChartRenderingInfo().setEntityCollection(null);
    barChartPanel.setBorder(BorderFactory.createTitledBorder(message));
    barChartPanel.setPreferredSize(new java.awt.Dimension(320, 240));
    barChartPanel.setLayout(new BorderLayout());
    setLayout(new BorderLayout());
    add(barChartPanel);
}

From source file:Operacional.Janela2.java

public Janela2() {
    super();//from w  w w.  j  a  va 2s  .  com
    IntervalXYDataset intervalxydataset = createDataset();
    jfreechart = createChart(intervalxydataset);
    chartpanel = new ChartPanel(jfreechart);
    chartpanel.setPreferredSize(new Dimension(500, 300));
    setLayout(new BorderLayout());
    add(chartpanel, BorderLayout.NORTH);
}

From source file:com.floreantpos.config.ui.OtherConfigurationView.java

public OtherConfigurationView() {
    setLayout(new BorderLayout());

    JPanel contentPanel = new JPanel();
    contentPanel.setLayout(new MigLayout("", "[][]", "[]")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

    tfMapApiKey = new FixedLengthTextField(); //$NON-NLS-1$
    tfMapApiKey.setLength(220);/*from  w w w  .j  a v  a2  s  .  c o  m*/
    contentPanel.add(new JLabel(Messages.getString("OtherConfigurationView.0"))); //$NON-NLS-1$
    contentPanel.add(tfMapApiKey); //$NON-NLS-1$

    JScrollPane scrollPane = new JScrollPane(contentPanel);
    scrollPane.setBorder(null);
    add(scrollPane);
}

From source file:SimpleDraw.java

public SimpleDraw() {
    this.setTitle("Simple DRAW");
    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    // add check box group
    ButtonGroup cbg = new ButtonGroup();
    JRadioButton lineButton = new JRadioButton("Line");
    JRadioButton ovalButton = new JRadioButton("Oval");
    JRadioButton rectangleButton = new JRadioButton("Rectangle");
    cbg.add(lineButton);//  w w  w  .  j  a v  a  2  s. c  o  m
    cbg.add(ovalButton);
    cbg.add(rectangleButton);
    lineButton.addActionListener(this);
    ovalButton.addActionListener(this);
    rectangleButton.addActionListener(this);
    rectangleButton.setSelected(true);
    JPanel radioPanel = new JPanel(new FlowLayout());
    radioPanel.add(lineButton);
    radioPanel.add(ovalButton);
    radioPanel.add(rectangleButton);
    this.addMouseListener(this);
    this.setLayout(new BorderLayout());
    this.add(radioPanel, BorderLayout.NORTH);
}