java jtable问题
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);
}