I want to loop through an array of numbers and use those to plot points. What method should I be thinking of? I know there's one that takes an X and Y coordinate and draws points. Is there one that draws bars, too?
Swing draw points
Collapse
X
-
A bar basically is just a rectangle; a Graphics object can draw rectangles.
kind regards,
Jos -
Read Sun's Swing tutorial. The AWT event dispatch thread calls the paint() method which calls the paintComponent( ) method; that's the method you have to override (re-implement) if you want to draw your own stuff. Your approach is not going to work.
kind regards,
JosComment
Comment