JAVA Chat Window

Source: Internet
Author: User

//Chat WindowImportjava.awt.*;Importjavax.swing.*; Public classJiemian9extendsjframe{JTextArea Wby;//text FieldJPanel MB;//PanelJComboBox xlk;//Drop- down boxJButton an;//ButtonJTextField wbk;//text BoxJScrollPane GD;//scrolling         Public Static voidMain (string[] args) {//to run this class of construction methodsJiemian9 Jiemian =NewJiemian9 (); }         PublicJiemian9 () {//AddWby =NewJTextArea (); MB=NewJPanel (); String[] LT= {"Goku", "Eight commandments", "Sand Monk", "Tang priest"}; Xlk=NewJComboBox (LT); an=NewJButton ("Send"); WBK=NewJTextField (10); GD=NewJScrollPane (Wby); //Add to PanelMb.add (XLK);        Mb.add (WBK);        Mb.add (an);  This. Add (GD);  This. Add (Mb,borderlayout.south); //Set Window caption         This. settitle ("Chat window"); //Set the width height of the window         This. SetSize (500,350); //add title bar picture         This. Seticonimage (NewImageIcon ("Image/1.jpg") . GetImage ()); //The Settings window appears for the location of the screen         This. setlocation (100,100); //no pulling the big pull small         This. setresizable (false); //releasing a resource after closing a window         This. Setdefaultcloseoperation (Jframe.exit_on_close); //Output Window         This. setvisible (true); }    }

JAVA Chat Window

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.