jmathplot doesn't work in swing application
问题 I'm trying to use the jmathplot library in a swing application. Problem is, it doesn't seem to work when I add it to a JPanel as follows: // create your PlotPanel (you can use it as a JPanel) double[] x = new double[] { 0, 1, 2, 3, 4, 5 }; double[] y = new double[] { 10, 11, 12, 14, 15, 16 }; // create your PlotPanel (you can use it as a JPanel) Plot2DPanel graph = new Plot2DPanel(); graph.setBounds(0, 0, 782, 272); // add a line plot to the PlotPanel graph.addLinePlot("my plot", x, y);