Group work progress (only about not yet added content)

Source: Internet
Author: User


Package Zuoye;
Import Java.awt.BorderLayout;
Import java.awt.Component;
Import Java.awt.Window;
Import java.awt.event.*;
Import javax.swing.*;
Import java.awt.event.*;
Import javax.swing.*;

public class Game {

Protected static final Component dlg = null;

public static void Main (string[] args) {
TODO auto-generated Method Stub
JFrame frm = new JFrame ("Game assistant");
Frm.setdefaultcloseoperation (Jframe.exit_on_close);
Frm.setlayout (NULL);

Final JDialog dlg = new JDialog (frm, "Game Little Helper");
Dlg.setbounds (445, 220, 200, 150);
Dlg.setlayout (NULL);
Dlg.setmodal (TRUE);

JLabel Userlabel = new JLabel ("User:");
Userlabel.setbounds (40, 20, 80, 30);
JLabel UserLabel1 = new JLabel ();
Userlabel1.settext ("Password:");
Userlabel1.setbounds (40, 50, 80, 30);

JTextField Usertext = new JTextField ();
Usertext.seteditable (TRUE);
Usertext.sethorizontalalignment (Swingconstants.left);
Usertext.setcolumns (20);
Usertext.setbounds (110, 20, 120, 30);

JButton obtn = new JButton ("login");
Obtn.setbounds (60, 100, 60, 30);
Obtn.addactionlistener (new ActionListener () {
@Override
public void actionperformed (ActionEvent e) {
TODO auto-generated Method Stub
Dlg.setvisible (TRUE);
}
});
Frm.add (OBTN);


JButton btn = new JButton ("select");
Btn.setbounds (50, 50, 100, 30);
Btn.addactionlistener (new ActionListener () {

@Override
public void actionperformed (ActionEvent e) {
TODO auto-generated Method Stub
Dlg.setvisible (FALSE);
}
});
Dlg.add (BTN);

Final JDialog Dlg1 = new JDialog (frm, "Welcome to register");
Dlg1.setbounds (450, 220, 200, 150);
Dlg1.setlayout (NULL);
Dlg1.setmodal (TRUE);
JTextField userText1 = new JTextField ();
Usertext1.seteditable (TRUE);
Usertext1.sethorizontalalignment (Swingconstants.left);
Usertext1.setcolumns (20);
Usertext1.setbounds (110, 50, 120, 30);
JButton obtn1 = new JButton ("registration");
Obtn1.setbounds (160, 100, 60, 30);
Obtn1.addactionlistener (New ActionListener () {
@Override
public void actionperformed (ActionEvent e) {
/ /TODO auto-generated Method Stub
Dlg1.setvisible (True);
}
});
Frm.add (OBTN1);

JButton btn1 = new JButton ("game");
Btn1.setbounds (50, 50, 100, 30);
Btn1.addactionlistener (New ActionListener () {

@Override
public void actionperformed (ActionEvent e) {
TODO auto-generated Method Stub
Dlg1.setvisible (FALSE);
}
});
Dlg1.add (BTN1);

Frm.add (Userlabel);
Frm.add (Usertext);
Frm.add (USERLABEL1);
Frm.add (USERTEXT1);

Frm.setbounds (400, 200, 300, 200);
Frm.setvisible (TRUE);

}

}

Group work progress (only about not yet added content)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.