Package vue

Source Code of vue.Graph

package vue;

import javax.swing.JFrame;

import org.math.plot.Plot2DPanel;

import tool.Language;

public class Graph extends JFrame {

  /**
   *
   */
  private static final long serialVersionUID = 1L;
 
  private Language la;
  private JFrame frame;
  private Plot2DPanel plot;
 
  public Graph(double[] x, double[] y)
  {
    this.la = new Language();
    this.drawGraph(x,y);
  }
 
  private void drawGraph(double[] x, double[] y)
  {
    this.plot = new Plot2DPanel();
    this.plot.addLegend(la.getText("graph_game"));
    this.plot.addLinePlot(la.getText("graph_sq"), x, y);
    this.frame = new JFrame(la.getText("graph_title"));
    this.frame.setSize(600, 600);
    this.frame.setContentPane(plot);
    this.frame.setVisible(true);
  }
}
TOP

Related Classes of vue.Graph

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.