If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Hybrid View

Very urgently. Please help.

Dear all,
I need to pass my homework tomorrow, but i spent 2 more hrs still cannt complete
it. please help.
I need to do a class that just two checkbox in the applet, one is circle,
one is rectangle. when user click the circle, it draw circle, when the user
click rectangle, it draws rectangle. If user unclick, the circle or rectangle
should disappear.
Here is my coding, please help.
***********************************************
import java.awt.*;
import javax.swing.*;
import java.applet.*;
import java.awt.event.* ;

Re: Very urgently. Please help.

Most of us have taken Java courses and have done the work ourselves. That
is how you learn and how you earn the right to be called a programmer. Everyone
of us has spent sleepless nights debugging to find an insidious bug. If you
are having problems, I suggest that you see your instructor or a tutor for
your course. We aren't going to do your homework for you.

Re: Very urgently. Please help.

To answer your question about why you see the circle and rectangle upon initialization...check
out your paint method. You are assigning the value true to each of your
boolean variables thereby forcing the boolean evaluation to true...you want
to evaluate whether the value is equivalent to true or false. In order to
do that you must use == operator.