Simple User Login Interface

Source: Internet
Author: User

Check.javapackage check;import javax.swing.*;p ublic class Check extends Jpanel{jlabel Namelabel1,namelabel2; JTextField name; JPasswordField password; JButton okbutton,cancelbutton;public Check () {namelabel1 = new JLabel ("username:"); namelabel2 = new JLabel ("Password:"); name = new JT Extfield;p assword = new JPasswordField, OKButton = new JButton ("OK"), CancelButton = new JButton ("Cancel"); Add ( NAMELABEL1); Add (name); add (Namelabel2); add (password); add (OKButton); add (CancelButton);}} Jframe.javapackage check;import javax.swing.*;import java.awt.*;p ublic class Jframe extends Jframe{check panel; private static final int d_width=320;private static final int d_height=120;public Jframe () {setSize (d_width,d_height); Settitle ("login");p anel = new Check (); Getcontentpane (). Add (Panel); setvisible (true); setresizable (false);}} Main.javapackage check;import javax.swing.*;p ublic class main extends jframe{public static void main (string[] args) { Jframe frame= new Jframe (); Frame.setdefaultcloseoperation (Jframe.exit_on_cloSE);}} 

  

Simple User Login Interface

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.