Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import wheels.users.*;
- import java.awt.Color;
- public class GraphBar extends Frame{
- private Rectangle r;
- public GraphBar(String barcode, int change){
- for (int i = 0; i < barcode.length(); i++, change++) {
- r = new Rectangle();
- r.setColor(Color.black);
- r.setLocation(15 * change, 0);
- if (barcode.charAt(i) == 'l')
- r.setSize(5,100);
- else
- r.setSize(5,50);
- }
- }
- public static void main(String[] args){
- GraphBar app = new GraphBar("ll:::",0);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement