
很急的问题,java 高手帮忙啊!!!! 20
源程序如下:为什么我用Jbuilder2006调试的时候会出现nointerfaceexpectedhereatline(29:36);这是为什么啊?高手帮帮我!!!错误...
源程序如下 :为什么我用Jbuilder2006 调试的时候会出现
no interface expected here at line (29:36);
这是为什么啊?高手帮帮我!!!
错误在哪儿? 应该怎么改正!!
还有这是不是Jbuilder2006 环境的问题????
package myframe;
import java.awt.*;
import java.awt.event.*;
public class myframe {
public static void main(String[] args) {
Frame f=new Frame();
f.setTitle("my web") ;
f.setSize(400,400) ;
f.setLocation(400,400) ;
f.setBackground(Color.BLUE ) ;
f.setLayout(new GridLayout(3,2));
Button btn1=new Button("north");
Button btn2=new Button("south");
Button btn3=new Button("west");
Button btn4=new Button("east");
Button btn5=new Button("center");
f.add(btn1);
f.add(btn2);
f.add(btn3);
f.add(btn4);
f.add(btn5);
f.setVisible(true);
}
}
class MywindowListener extends WindowListener {
void windowOpened(WindowEvent e)
{
}
void windowClosing(WindowEvent e)
{
}
void windowClosed(WindowEvent e)
{
}
void windowIconified(WindowEvent e)
{
}
void windowDeiconified(WindowEvent e)
{
}
void windowDeactivated(WindowEvent e)
{
}
} 展开
no interface expected here at line (29:36);
这是为什么啊?高手帮帮我!!!
错误在哪儿? 应该怎么改正!!
还有这是不是Jbuilder2006 环境的问题????
package myframe;
import java.awt.*;
import java.awt.event.*;
public class myframe {
public static void main(String[] args) {
Frame f=new Frame();
f.setTitle("my web") ;
f.setSize(400,400) ;
f.setLocation(400,400) ;
f.setBackground(Color.BLUE ) ;
f.setLayout(new GridLayout(3,2));
Button btn1=new Button("north");
Button btn2=new Button("south");
Button btn3=new Button("west");
Button btn4=new Button("east");
Button btn5=new Button("center");
f.add(btn1);
f.add(btn2);
f.add(btn3);
f.add(btn4);
f.add(btn5);
f.setVisible(true);
}
}
class MywindowListener extends WindowListener {
void windowOpened(WindowEvent e)
{
}
void windowClosing(WindowEvent e)
{
}
void windowClosed(WindowEvent e)
{
}
void windowIconified(WindowEvent e)
{
}
void windowDeiconified(WindowEvent e)
{
}
void windowDeactivated(WindowEvent e)
{
}
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询