It is difficult to find various drawings for reporting on the Internet. Here is my recent new work. A little bit of small things, share with you, if you have any questions, please send it to dengzi725@sohu.com
Applet origin, open with jcreator.
Import java.awt. *; import java.applet. *;
Public Class Draw Extends Applet {Private Int Data [], I; Static Color Color [] = {Color Color Color [] = {Color.range, Color.Blue, Color.cyan, Color.Dark_GRAY, Color.Gray, Color.green, Color.Magenta, Color PUBLIC DRAW () {} public road () {} public void = new int [10]; data [0] = 100; Data [1] = 150; Data [2] = 60; DATA [3] = 30; Data [4] = 20; Data [5] = 60; Data [6] = 200; Data [7] = 600; data [8] = 210; data [9] = 10;
} Public void Paint (Graphics G) {Font F1 = New Font ("Verdana", Font.Bold, 25); G.SetFont (F1); G.drawString ("The Product of Last Year", 150, 25); FONT F2 = New Font ("Verdana", Font.Bold, 10); G.SetFont (F2); for (i = 0; i <= 7; i ) {g.drawline (30, 50 i * 25, 630, 50 i * 25); g.drawstring (700-i * 100 "", 5,52 i * 25);} g.drawline (30, 30, 30, 224); for (i = 0; i <12 ; i ) {g.setcolor (color.black); g.drawstring (i 1 "m", 50 i * 50, 240);
} For (i = 0; i <= 11; i ) {g.setcolor (color [i]); g.FillRect (50 i * 50, 225-data [i] / 4, 28, data [i] / 4 ); G.drawstring (Data [i] ", 50 i * 50 2, 220-data [i] / 4);
}
}
HTML original code is as follows: