【问题标题】:What is the org.eclipse.swt.widgets.Table; equivalent for jTable1.setValueAt?什么是org.eclipse.swt.widgets.Table;等效于 jTable1.setValueAt?
【发布时间】:2015-07-21 14:43:02
【问题描述】:

我已经从使用 NetBeans 转移到 Eclipse。

并且像下面这样的行不起作用,因为我已经不再使用:

JTables 到 SWT 表

如何修改这行代码以适用于 SWT 表:

jTable1.setValueAt(v.getDate(), nCount+1, 0);

【问题讨论】:

  • "..我已经从使用:JTables 转移到 SWT Tables.." .. 为什么?
  • 是的,你为什么要这样做?

标签: java eclipse swing netbeans swt


【解决方案1】:

假设您只使用 Table(而不是 JFace TableViewer),您将使用:

TableItem item = table.getItem(row);

item.setText("text");

如果您有多个列使用:

item.setText(column, "text");

【讨论】:

    猜你喜欢
    • 2019-04-16
    • 1970-01-01
    • 2016-08-06
    • 1970-01-01
    • 1970-01-01
    • 2015-06-09
    • 1970-01-01
    • 2017-07-31
    • 2014-02-09
    相关资源
    最近更新 更多