java jtable问题

qq_38081432 2018-10-09 08:56:17
package 进度条;

import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.ProgressBar;

import java.util.Timer;
import java.util.TimerTask;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Table;

public class Jin {

protected Shell shell;
private Table table_1;

/**
* Launch the application.
* @param args
*/
public static void main(String[] args) {
try {
Jin window = new Jin();
window.open();
} catch (Exception e) {
e.printStackTrace();
}
}

/**
* Open the window.
*/
public void open() {
Display display = Display.getDefault();
createContents();
shell.open();
shell.layout();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
}

/**
* Create contents of the window.
*/
protected void createContents() {
shell = new Shell();
shell.setSize(636, 424);
shell.setText("SWT Application");

ProgressBar progressBar = new ProgressBar(shell, SWT.NONE);
progressBar.setBounds(398, 10, 210, 21);
progressBar.setMaximum(100);
progressBar.setMinimum(0);

Object[] columnNames = {"姓名", "语文", "数学", "英语", "总分"};
Object[][] rowData = {
{"1", 80, 80, 80, 240},
{"2", 70, 80, 90, 240},
{"3", 70, 70, 70, 210},
{"4", 80, 70, 60, 210},
{"5", 80, 70, 60, 210}
};
table_1 = new Table(rowData,columnNames); 为什么说我这里没定义~~构造函数 Table(Object[][], Object[])未定义
table_1.setBounds(31, 10, 348, 155);
table_1.setHeaderVisible(true);
table_1.setLinesVisible(true);
}
...全文
196 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

51,409

社区成员

发帖
与我相关
我的任务
社区描述
Java相关技术讨论
javaspring bootspring cloud 技术论坛(原bbs)
社区管理员
  • Java相关社区
  • 小虚竹
  • 谙忆
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧