level 7
无我无梵
楼主
P1.Java
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
public class P1 extends JFrame implements ActionListener {
JButton jb3;
JTextArea t=new JTextArea(15,25);
static String str;
P1(){
super("查找");
this.setDefaultCloseOperation(3);
jb3=new JButton("查找");
this.add(t);
this.add(jb3);
this.setLayout(new FlowLayout());
this.setVisible(true) ;
this.setSize(500,450) ;
this.setLocation(300,200) ;
this.setFocusable(true);
this.validate();
jb3.addActionListener(this);
}
public static void main(String[] args) {
new P1();
}
public void actionPerformed(ActionEvent e) {
if(e.getSource()==jb3){
str=t.getText();
P2 ms=new P2();
ms.xun(str);
}
}
}
2014年06月19日 04点06分
1
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
public class P1 extends JFrame implements ActionListener {
JButton jb3;
JTextArea t=new JTextArea(15,25);
static String str;
P1(){
super("查找");
this.setDefaultCloseOperation(3);
jb3=new JButton("查找");
this.add(t);
this.add(jb3);
this.setLayout(new FlowLayout());
this.setVisible(true) ;
this.setSize(500,450) ;
this.setLocation(300,200) ;
this.setFocusable(true);
this.validate();
jb3.addActionListener(this);
}
public static void main(String[] args) {
new P1();
}
public void actionPerformed(ActionEvent e) {
if(e.getSource()==jb3){
str=t.getText();
P2 ms=new P2();
ms.xun(str);
}
}
}
