当前位置: 技术问答>java相关
帮我看看我这个程序那里错了?为什么编译后什么都显示不出来!!!
来源: 互联网 发布时间:2015-04-16
本文导语: import java.awt.*; import java.applet.*; import javax.swing.*; import javax.swing.table.*; import javax.swing.event.*; import java.util.*; import java.net.*; import java.applet.*; public class FutureSystem extends JApplet { public void init() { ...
import java.awt.*;
import java.applet.*;
import javax.swing.*;
import javax.swing.table.*;
import javax.swing.event.*;
import java.util.*;
import java.net.*;
import java.applet.*;
public class FutureSystem extends JApplet {
public void init() {
Container contentPane=getContentPane();
contentPane.add(new FutureSystemPanel());
}
}
class FutureSystemPanel extends JPanel{/*界面面板*/
private JTable MardetTable;
private JTable BuyTable;
private JTable SellTable;
private JTable CommodityTypeTable;
private JTextArea FeedbackMessageText;
public void FutureSystemPanel(){
Object[][] cells={{"hehe","haha"},{"hello","world"}};
String[] columnName={"A","z"};
MardetTable=new JTable(5,10);
MardetTable.setSize(100,100);
MardetTable.setAutoscrolls(true);
JScrollPane sp=new JScrollPane(MardetTable);
FeedbackMessageText=new JTextArea("hehehehe",3,5);
FeedbackMessageText.setSize(100,100);
setLayout(null);
add(MardetTable);
add(FeedbackMessageText);
}
}
import java.applet.*;
import javax.swing.*;
import javax.swing.table.*;
import javax.swing.event.*;
import java.util.*;
import java.net.*;
import java.applet.*;
public class FutureSystem extends JApplet {
public void init() {
Container contentPane=getContentPane();
contentPane.add(new FutureSystemPanel());
}
}
class FutureSystemPanel extends JPanel{/*界面面板*/
private JTable MardetTable;
private JTable BuyTable;
private JTable SellTable;
private JTable CommodityTypeTable;
private JTextArea FeedbackMessageText;
public void FutureSystemPanel(){
Object[][] cells={{"hehe","haha"},{"hello","world"}};
String[] columnName={"A","z"};
MardetTable=new JTable(5,10);
MardetTable.setSize(100,100);
MardetTable.setAutoscrolls(true);
JScrollPane sp=new JScrollPane(MardetTable);
FeedbackMessageText=new JTextArea("hehehehe",3,5);
FeedbackMessageText.setSize(100,100);
setLayout(null);
add(MardetTable);
add(FeedbackMessageText);
}
}
|
oh,my god
你的构造函数怎么能void?
不可以为constructor声明类型的。
你的构造函数怎么能void?
不可以为constructor声明类型的。