Java Simple page Authoring

Source: Internet
Author: User

1  Packageinterface;2 Importjava.awt.*;3 4 ImportJavax.swing.JFrame;5 Importjavax.swing.*;6 //import javax.swing.table.*;7 8 9  Public classDmgl_interfaceextendsjframe{Ten      One      A     //defining buttons and labels - JLabel L_header,l_language,l_type,l_title; - JComboBox Language,type; the JTextField Title; - JTextArea Code; - JButton confirm,cancle; -      +      -      Publicdmgl_interface () +     { A          at          -          -         //Layout -Container ContentPane = Getcontentpane ();//Defining container class objects -SetLayout (NewFlowLayout ());//do not set layout -Settitle ("Add Code"); in         //Language Box -JPanel p_header=NewJPanel (); toString [] slanguage=Newstring[]{"Default", "Java", "JavaScript", "C", +"C + +", "C #", "PHP", "Delphi", "SAS", "pl/sq", "Web", "ABAP"}; -L_header =NewJLabel ("Language"); theLanguage=NewJComboBox (slanguage); *      $     Panax Notoginseng P_header.add (l_header); - P_header.add (Language); the          +         //Type box AL_type =NewJLabel ("type"); theString [] stype=Newstring[]{"Default", "function", "Knowledge", "Module", "program",}; +Type=NewJComboBox (stype); -          $ P_header.add (l_type); $ P_header.add (Type); - Add (p_header); -         //Title Box theJPanel p_title=NewJPanel (); -L_title =NewJLabel ("Please enter title");WuyiTitle =NewJTextField ("", 20); the P_title.add (l_title); - P_title.add (Title); Wu Add (p_title); -         //text Field AboutCode =NewJTextArea ("", 20,32); $JScrollPane G_code =NewJScrollPane (code,jscrollpane.vertical_scrollbar_always,jscrollpane.horizontal_scrollbar_always); - Add (g_code); -          -          A         //Button +JPanel p_button=NewJPanel (); theconfirm=NewJButton ("Save"); -cancle=NewJButton ("Cancel"); $ P_button.add (Confirm); the P_button.add (cancle); the Add (P_button); the         //To set the window's visible words and size theSetSize (400,550); -SetVisible (true); in     } the      the      About      the      the      the      +     //Main function -      Public Static voidMain (String args[]) the {Bayi     Newdmgl_interface (); the } the  -}

Java Simple page Authoring

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.