简体   繁体   English

通过输入第一个单元格值在JTable加载行

[英]JTable loading row by entering the first cell value

如何通过输入第一个像元值​​来加载行数据,例如watchList JTable,并且在第一列中是股票代码,因此当我输入F符号时,我将获得与股票相关的详细信息,例如名称,最后价格,买入价和问?

You can add a TableModelListener to the TableModel . 您可以将TableModelListener添加到TableModel An event will be fired when data is changed in the model. 当模型中的数据更改时,将触发一个事件。 If the data is changed in column 0, then you load the rest of the data for the row. 如果在第0列中更改了数据,则将为该行加载其余数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM