从JTable获取索引行 [英] Get row by index from JTable

查看:104
本文介绍了从JTable获取索引行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何获取索引i来自JTable的行?我查看了成员函数,但没有像getRowAt那样的东西。有人可以帮忙吗?

How to get row with index i froj JTable ? I looked at member functions but there is nothing like getRowAt . Can anybody help ?

推荐答案

表没有行对象,因此getRow方法无法获得任何结果。

There is no "row" object for a table, so nothing you could get with a getRow method.

您可以要求 getValueAt()获取单个值,将其用于每列,然后您就完成了行。

You can ask getValueAt() to get the individual values, use it for each column and you have your complete row.

这篇关于从JTable获取索引行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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