我这代码错哪了????

YXTS122 2016-08-10 07:16:17
import java.awt.Button;
import java.awt.CardLayout;
import java.awt.Frame;


public class NewCardLayout
{
public static void main(String[] args)
{
Frame f=new Frame();
f.setLayout(new CardLayout());
f.add(new Button("按钮一"),"card1");
f.add(new Button("按钮二"),"card2");
f.add(new Button("按钮三"),"card3");
f.setBounds(100,100,250,250);
f.setVisible(1);
}
}



...全文
181 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
usecf 2016-08-10
  • 打赏
  • 举报
回复
鼠标放在红色叉上,看提示什么错误就知道了。
nikyotensai 2016-08-10
  • 打赏
  • 举报
回复
引用 1 楼 qnmdcsdn 的回复:
The method setVisible(boolean) in the type Window is not applicable for the arguments (int); 接收boolean类型的值,你传的是个int
+1
自由自在_Yu 2016-08-10
  • 打赏
  • 举报
回复
  • 打赏
  • 举报
回复
The method setVisible(boolean) in the type Window is not applicable for the arguments (int); 接收boolean类型的值,你传的是个int

58,453

社区成员

发帖
与我相关
我的任务
社区描述
Java Eclipse
社区管理员
  • Eclipse
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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