を拡張する誰かのクラス内のいくつかの統計データをグラフ化する必要がありますJPanel
。現在の計画では、次のようにクラスpaintComponent
を使用する予定です。Graphics
public void paintComponent(Graphics g) {
super.paintComponent(g);
//create a rectangle to represent the outline of the graph
g.drawRect(300, 50, 400, 350);
//set up the datapoints
for(int i = 0; i < data.size(); i++) {
//put the datapoints where ever they need to go within this rectangle
g.drawOval(x, y, width, height);
}
}
これはどういうわけかひどいですか?さらに重要なことに、私が使用できるが知らない、素晴らしい、使いやすいグラフ作成ライブラリがいくつかありますか?
ありがとう。