public void actionPerformed(ActionEvent e)
{
String command;
command=e.getActionCommand();
if (command.equals("front"))
lay.previous("next"); 此处提示错误
else if (command.equals("next"))
lay.next("front"); 此处提示错误
}
我已经标记出错误的地方了呀!
帮我看看,谢谢了!
{
String command;
command=e.getActionCommand();
if (command.equals("front"))
lay.previous("next"); 此处提示错误
else if (command.equals("next"))
lay.next("front"); 此处提示错误
}
我已经标记出错误的地方了呀!
帮我看看,谢谢了!
解决方案 »
- 创建数组报错,求教!
- 一个简单的socket实例,大家看看问题出在哪?
- 将txt文本中的数据插入到jtable中
- 有关JAVA串口编程。。。。javax.comm.NoSuchPortException
- poi导出Excel中插入网络图片的问题||给定URL得到实际地址
- 请教大家,我想通过JDBC访问一台安全性设置为Windows验证的SQL Server,请问如何写创建数据库连接的程序呀?
- 单子模式系列化
- 关于透明PNG图片的显示问题
- 请问如何写applet的数字签名,写在那里??
- 小弟初学,请指教,我对数据封装不太明白!
- 在GridLayout布局下,如何使一个控件占多行或多列?
- 关于Thread.sleep()方法
public void previous(Container parent)
Flips to the previous card of the specified container. If the currently visible card is the first one, this method flips to the last card in the layout. Parameters:
parent - the name of the parent container in which to do the layout.看看这个,说明你的参数有问题!
// lay.previous("next"); //此处提示错误
lay.previous(cp);
else if (command.equals("next"))
// lay.next("front"); //此处提示错误
lay.next(next);另外public mycard() 里
c.add(sp);
show();
lay.next(cp);
另外
sp.add(previous);
sp.add(next); //<<<< 这里加上next按钮
sp.add(cp);