level 3
Schlaudraff
楼主
package domain; import javax.swing.*;
import java.awt.*;
/**
*
* @author Cruz Tan
*/
public class Main extends test //implements MouseListener
{
static JTextField txt1 = new JTextField();
static JTextField txt2 = new JTextField(); static JButton but1 = new JButton("开始");
static JButton but2 = new JButton("重置"); static JLabel name1 = new JLabel("Name1");
static JLabel name2 = new JLabel("Name2");
static JTable tex1 = new JTable (8, 6);
static JTable tex2 = new JTable (16, 16);
static TextArea te1=new TextArea(HERONAME, 4, 4,TextArea.SCROLLBARS_NONE);
static TextArea te2=new TextArea(FLIGHT, 4, 4,TextArea.SCROLLBARS_NONE);
static JFrame frm=new JFrame("姓名大作战"); public static void main(String arg[])
{
frm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frm.setBounds(0, 0, 800, 600);
frm.setVisible(true);
frm.setLayout(null);
frm.add(txt1);
frm.add(txt2);
frm.add(but1);
frm.add(but2);
frm.add(name1);
frm.add(name2);
frm.add(tex1);
frm.add(tex2);
frm.add(te1);
frm.add(te2); name1.setBounds(20, 5, 80, 20);
txt1.setBounds(20, 40, 80, 30);
but1.setBounds(20,80,80,30); name2.setBounds(180, 5, 120, 20);
txt2.setBounds(180, 40, 80, 30);
but2.setBounds(180,80,80,30); te1.setBounds(20,150,250,300);
te2.setBounds(350,5,300,500);
} }
2011年12月29日 11点12分
1
import java.awt.*;
/**
*
* @author Cruz Tan
*/
public class Main extends test //implements MouseListener
{
static JTextField txt1 = new JTextField();
static JTextField txt2 = new JTextField(); static JButton but1 = new JButton("开始");
static JButton but2 = new JButton("重置"); static JLabel name1 = new JLabel("Name1");
static JLabel name2 = new JLabel("Name2");
static JTable tex1 = new JTable (8, 6);
static JTable tex2 = new JTable (16, 16);
static TextArea te1=new TextArea(HERONAME, 4, 4,TextArea.SCROLLBARS_NONE);
static TextArea te2=new TextArea(FLIGHT, 4, 4,TextArea.SCROLLBARS_NONE);
static JFrame frm=new JFrame("姓名大作战"); public static void main(String arg[])
{
frm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frm.setBounds(0, 0, 800, 600);
frm.setVisible(true);
frm.setLayout(null);
frm.add(txt1);
frm.add(txt2);
frm.add(but1);
frm.add(but2);
frm.add(name1);
frm.add(name2);
frm.add(tex1);
frm.add(tex2);
frm.add(te1);
frm.add(te2); name1.setBounds(20, 5, 80, 20);
txt1.setBounds(20, 40, 80, 30);
but1.setBounds(20,80,80,30); name2.setBounds(180, 5, 120, 20);
txt2.setBounds(180, 40, 80, 30);
but2.setBounds(180,80,80,30); te1.setBounds(20,150,250,300);
te2.setBounds(350,5,300,500);
} }