"Implementation Interface"
Analysis
The whole with default borderlayout (border layout), divided into upper and lower, respectively, with three JPanel storage;
On: A picture, with JLabel;
Under: Three buttons JButton
Middle: Stored with a jtabbedpane (tab)
Each option is a GridLayout (grid layout)
Four JLabel, one JTextField, one jpassword, one JButton, two jcheckbox (check box)
Code
Package Start;import java.awt.*;//must be introduced in two packages import Javax.swing.*;//public class Main extends jframe{ / /definition Controls jlabel labeln;//North jbutton btn1,btn2,btn3; JPanel panels; Integrated///South jtabbedpane panemid;//tab //Central jpanel panel1,panel2,panel3; jlabel label1,label2,label3,label4,label5,label6,label7,label8,label33, label44; jtextfield text,text1,text2; jpasswordfield password,password1, password2; jbutton btnofmodify,btnofmodify2; jcheckbox checkbox1,checkbox2; jcheckbox checkbox3,checkbox4; public static void Main (String [] args) { main lx= new Main (); } public Main () { //North labeln=new JLabel (New ImageIcon ("image/6.jpg"));//North Chubu label1=new JLabel ("QQ number", Jlabel.center); label2=new JLabel ("QQ password", jlabel.center); label3=new JLabel ("Forgot Password", Jlabel.center); label3.setfont (New Font ("italics", font.plain,16); label3.setforeground (Color.Black);//Set Font color label33= New JLabel ("Forgot password", jlabel.center); label4 =new JLabel ("
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Java-gui Practice example, QQ login interface