As far as I know, this code is supposed to draw a black circle, and then slowly move it across the screen.. only problem is.. it doesn't move.. and on my computer, if i extend the applets screen, the ball dissapears and moves back if i shrink the applet back down.. if someone can help me id appreciate it..
Code:// This applet displays a message moving horizontally // across the screen. import java.awt.*; import javax.swing.*; public class Banner extends JApplet { public void init() { Container c = getContentPane(); repaint(); } public void paint(Graphics g) { int x = 10; int y = 10; super.paint(g); g.fillOval(x, y, 20, 20); x++; } }


Reply With Quote


Bookmarks