package com.even2;
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class EN_1 extends JFrame
{
ACT111 al=new ACT111();
JButton jb=new JButton();
JButton jb1=new JButton();
GridLayout gl=new GridLayout();
JPanel jp=new JPanel();
jp.setLayout();
//错误提示:
// Multiple markers at this line
// - Syntax error on token "setLayout", Identifier expected after this
// token
// - Syntax error, insert ";" to complete MethodDeclaration
public static void main(String[] args)
{
}
EN_1()
{
jp.setLayout()
this.add(jp);
}
}
// 首先,先定义一个事件监听器类
public class ACT111 implements ActionListener
{
public void ActionPerformed(ActionEvent e)
{
System.out.println("我就不处理事件!");
}
ACT111()
{
}
}
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class EN_1 extends JFrame
{
ACT111 al=new ACT111();
JButton jb=new JButton();
JButton jb1=new JButton();
GridLayout gl=new GridLayout();
JPanel jp=new JPanel();
jp.setLayout();
//错误提示:
// Multiple markers at this line
// - Syntax error on token "setLayout", Identifier expected after this
// token
// - Syntax error, insert ";" to complete MethodDeclaration
public static void main(String[] args)
{
}
EN_1()
{
jp.setLayout()
this.add(jp);
}
}
// 首先,先定义一个事件监听器类
public class ACT111 implements ActionListener
{
public void ActionPerformed(ActionEvent e)
{
System.out.println("我就不处理事件!");
}
ACT111()
{
}
}