[蟲?] 各位大大幫我看個小問題好嗎 ? 除錯的問題呢 !
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
→
06/15 20:34, , 1F
06/15 20:34, 1F