Generating a standard deviation plot from a row in a JTable

时光怂恿深爱的人放手 提交于 2020-01-11 07:45:11

问题


I am trying to create a JTable that I can be able to click on a row and it will display a standard deviation curve. Here is what my JTable looks like right now.

So for example, the standard deviation for the string screen saver, action->login, login->disclaimer, ok would look like this (I plotted it in excel)

So my question is #1 is this possible and #2 if so then how?


回答1:


ChartFactory.createHistogram() with an IntervalXYDataset such as HistogramDataset might be a suitable choice. HistogramDemo1, seen among the statistical charts in the JWS demo, is an example. You can determine which row was clicked using a ListSelectionListener, as shown here. You can retrieve the required values from your TableModel using getValueAt(), as shown here.



来源:https://stackoverflow.com/questions/16085734/generating-a-standard-deviation-plot-from-a-row-in-a-jtable

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!