Draw a line with Java 2)

Source: Internet
Author: User

---- Appendix: StockApplet. java
Import java. applet .*;
Import java. awt .*;
Import java. io .*;
Import java.net .*;
Public class StockApplet extends java. applet. Applet implements Runnable
{// The following is the declaration of public variables
Int Move_Length = 0, Move_Sum = 0;
String FileName, Name_Str, Content_Date;
Int SP [] = new int [2000];
Int KP [] = new int [2000];
Int JD [] = new int [2000];
Int JG [] = new int [2000];
Int Mid_Worth [] = new int [2000];
String myDate [] = new String [2000];
Double CJL [] = new double [2000];
Double MaxCJL, MidCJL;
Label label [] = new Label [10];
Int MaxWorth, MinWorth;
Int x_move0, x_move1, MaxLength = 0;
Int x0, y0, X, Y, Record_Num;
Boolean Mouse_Move, Name_Change = true;
Int JX_Five1, JX_Five2, JX_Ten1, JX_Ten2;
Public void init ()
{
TextField text1 = new TextField ();
Thread M_pointThread = null;
SetLayout (null); // declare the layout manager
This. setBackground (Color. white); // sets the background Color.
This. setForeground (Color. black); // set the text Color
For (int I = 1; I <10; I ++) // The following loop is used to add labels to the layout.
{
Label [I] = new Label ();
This. add (label [I]);
Label [I]. reshape (I * 80-65,10, 50, 15 );

Related Article

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.