私は、swing アプリケーションでjmathplotライブラリを使用しようとしています。
問題は、次のように JPanel に追加すると機能しないように見えることです。
// 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);
JPanel panel = new JPanel();
panel.setBounds(10, 333, 782, 272);
tab_analysis.add(panel);
panel.setLayout(null);
panel.add(graph);
プロットが表示されず、奇妙な軸も取得されるため:
サイトには次のように記載されています。
use the PlotPanel as any Swing component (all PlotPanel extends JPanel, in fact)
私は何を間違っていますか?