eclipse中tableviewer怎么增加复选框

 时间:2024-10-14 14:22:17

1、在eclipse中新建一个swt-java项目,项目名称javacheck.

eclipse中tableviewer怎么增加复选框

2、在项目中新建一个swt application窗口。

eclipse中tableviewer怎么增加复选框

3、在shell窗口中增加TableViewer、TableViewerColumn。

eclipse中tableviewer怎么增加复选框

4、在TableViewer表格增加数据。{ TableItem ti=new TableItem(table,SWT.NONE); ti.setText(0,"安阳"); ti.setText(1,"300百万"); } { TableItem ti=new TableItem(table,SWT.NONE); ti.setText(0,"郑州"); ti.setText(1,"900百万"); } { TableItem ti=new TableItem(table,SWT.NONE); ti.setText(0,"洛阳"); ti.setText(1,"500百万"); }

eclipse中tableviewer怎么增加复选框

5、在TableViewer中增加复选框。TableViewer tableViewer = new TableViewer(shell,SWT.CHECK | SWT.BORDER | SWT.FULL_SELECTION);

eclipse中tableviewer怎么增加复选框

6、运行项目,效果如图。

eclipse中tableviewer怎么增加复选框
  • 如何使用CSS 元素选择器
  • 如何安装composer
  • jar,jre,jdk等几个词的区别
  • jquery返回顶部功能如何实现
  • win10系统中wampserver安装后Apache启动不了
  • 热门搜索
    腿短穿什么裤子 筚路蓝缕的意思 奔丧的意思 烫什么发型好看 梦幻西游什么职业好玩 翱翔的意思 遗憾的意思 低迷是什么意思 学古筝有什么好处 嘉的意思