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);
}
}