URGENT: Problem in Applet using awt - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

URGENT: Problem in Applet using awt

darksid3rdarksid3r Posts: 1Member

I need to make an applet which shows two lines that are at a distance from each other and are moving towards each other and i have to show this until they meet at a point... for this i wrote the following code..[/b]

[color=Blue]import java.applet.Applet;
import java.awt.*;

public class Drawing extends Applet{
int i;
int x=10;
int x1=50;
int x2=110,x3=150;
public void paint(Graphics g){


[color=Red]But the problem here is that it gets repainted and i see nothing...IS THERE A WAY TO PAUSE EVERYTIME THE LINES ARE DRAWN so that one can see whats happening?[/color]
Sign In or Register to comment.