Interface, failed product

Source: Internet
Author: User

Import Java.awt.gridlayout;import Java.io.bufferedreader;import Java.io.ioexception;import Java.io.inputstreamreader;import Javax.swing.jbutton;import Javax.swing.jframe;import Javax.swing.JLabel;import Javax.swing.jpanel;import javax.swing.jpasswordfield;import javax.swing.jtextfield;class Jiem extends JFrame{      JTextField JTextField;//define text box component JPasswordField jpasswordfield;//define cipher box component JLabel Jlabel1,jlabel2;      JPanel jp1,jp2,jp3;         Public Jiem () {JButton jbu1,jbu2;         JTextField = new JTextField (12);         JPasswordField = new JPasswordField (13);         JLabel1 = new JLabel ("User name");        JLabel2 = new JLabel ("password");         JBU1 = new JButton ("confirmation");        JBU2 = new JButton ("Cancel");        JP1 = new JPanel ();         JP2 = new JPanel ();                JP3 = new JPanel ();                 Set Layout this.setlayout (new GridLayout (3,1));          Jp1.add (JLABEL1);                  Jp1.add (JTextField);//First panel add user name and text box Jp2.add (JLABEL2); Jp2.adD (JPasswordField);//The second panel adds a password and password input box Jp3.add (JBU1); Jp3.add (JBU2);    The third panel adds confirmation and cancellation//Jp3.setlayout (New FlowLayout ());         Because JPanel default layout is FlowLayout, you can unregister this code.         This.add (JP1);         This.add (JP2);  This.add (JP3);         Add three panels to the login box//settings display This.setsize (300, 200);         This.pack ();         This.setdefaultcloseoperation (Jframe.exit_on_close);         This.setvisible (TRUE);      This.settitle ("Landing");      Public login () {String name= "abc";      int mima=123; }}

Interface, failed product

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.