Problematic code

Source: Internet
Author: User
 

 

 

A problematic program ..

Import javax. swing .*;
Import java. awt. event .*;
Import java. awt .*;

Class EditBook
{
Public static void main (String [] args)
 {
Edit e = new Edit ();
E. run ();
 }
}
Class Edit extends JFrame
{
 
JMenuBar jmb;
JMenu file;
JMenu compile;
JMenu tool;
JMenu help;
JMenuItem newF;
JMenuItem open;
JMenuItem save;
JMenuItem exit;
JMenuItem copy;
JMenuItem cut;
JMenuItem paste;
JMenuItem s_all;
JMenuItem color;
JMenuItem toolb;
JMenuItem toolc;
JMenuItem h;
JTextArea jta;
JDialog jd;
JPanel jp;

JToolBar jtb;

String message;

Public void run (){
Jmb = new JMenuBar ();
Jp = new JPanel ();
File = new JMenu ("file ");
Compile = new JMenu ("edit ");
Tool = new JMenu ("tool ");
Help = new JMenu ("help ");
  
NewF = new JMenuItem ("new ");
Open = new JMenuItem ("open ");
Save = new JMenuItem ("save ");
Exit = new JMenuItem ("exit ");

Copy = new JMenuItem ("Copy ");
Cut = new JMenuItem ("Cut ");
Paste = new JMenuItem ("Paste ");
S_all = new JMenuItem ("save all ");
Color = new JMenuItem ("Color ");

Toolb = new JMenuItem ("MS Notepad ");
Toolc = new JMenuItem ("MS calculator ");
  
H = new JMenuItem ("about ");

Jtb = new JToolBar ("MyJToolBar ");


Jta = new JTextArea (20, 30 );

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.