从JTable中的一行生成标准偏差图 [英] Generating a standard deviation plot from a row in a JTable

查看:70
本文介绍了从JTable中的一行生成标准偏差图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个JTable,我可以单击它并显示标准偏差曲线.这就是我的JTable现在的样子.

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.

例如,字符串screen saver, action->login, login->disclaimer, ok的标准偏差如下所示(我在excel中绘制)

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)

所以我的问题是#1是否可能,而#2如果可以,那么如何?

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

推荐答案

JWS演示的统计图表中可以看到HistogramDemo1.您可以使用ListSelectionListener确定单击了哪一行,如此处所示.您可以使用getValueAt()TableModel中检索所需的值,如此处所示.

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.

这篇关于从JTable中的一行生成标准偏差图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆