作者ilumiho (ilu..200)
看板java
标题[虫?] 各位大大帮我看个小问题好吗 ? 除错的问题呢 !
时间Wed Jun 15 19:49:49 2011
error: Class names, 'LayoutExample', are only accepted if annotation processing
is explicitly requested
各位大大好 我在编译的时候它出现这个东西 !!!
可是我都是照范例上面去做的 ~
是不是哪边需要改进呢 ??? 感恩!!!
以下是程式码的部份 !!!
import javax.swing.*;
import java.awt.*;
public class LayoutExample {
private JFrame f;
private JButton b1;
private JButton b2;
private JButton b3;
private JButton b4;
private JButton b5;
public LayoutExample (){
f = new JFrame("GUI example");
b1 = new JButton("Button 1");
b2 = new JButton("Button 2");
b3 = new JButton("Button 3");
b4 = new JButton("Button 4");
b5 = new JButton("Button 5");
}
public void launchFrame(){
f.setLayout(new Flowlayout());
f.add(b1);
f.add(b2);
f.add(b3);
f.add(b4);
f.add(b5);
f.pack();
f.setVisible(true);
}
public static void main(String args[]){
LayoutExample guiWindow = new LayoutExample();
guiWindow.launchFrame();
}
} // end of LayoutExample class
--
辣妹研究所 :
http://ilumiho.pixnet.net (有广告内容不喜勿入)
↑ ↑ ↑ ↑
懒人包下载区
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 111.67.58.67