Example usage for java.awt Panel setVisible

List of usage examples for java.awt Panel setVisible

Introduction

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

Prototype

public void setVisible(boolean b) 

Source Link

Document

Shows or hides this component depending on the value of parameter b .

Usage

From source file:com.seniorproject.augmentedreality.chart.ChartCreator.java

public Panel drawChart() {
    dataset = createDataset();//www. j  av  a 2s .c  o m
    chart = createChart(dataset);
    chartPanel = new ChartPanel(chart);
    //        chartPanel.setPreferredSize(new java.awt.Dimension(640, 480));
    Panel panel = new Panel();
    panel.setSize(640, 480);
    panel.add(chartPanel);
    panel.setVisible(true);
    return panel;
}