what is wrong with this program ?
This applet is to create two labels ( Oval ) and ( Line ) . so when we click the button Oval it draws Oval shape , and same with Line ..
*** The problem is when I run the prog .. Its shows the 2 buttons and the Oval shape is already there .. when I click the (Line) button it doesnt work ( it changes the Oval color from yellow to green ) ...
** I want to have separate action for each button. .
so when I click Oval .. it shows Oval with one color
and when I click Line ..it shows a line with one color ( the Oval shoud be disppear from da screen when Line is viewd )...
This is my program :
public class Two extends Applet implements ActionListener
public void init()
public void actionPerformed(ActionEvent e)
public void paint(Graphics g)