Re: Method for White Circle with black background
- From: "Oliver Wong" <owong@xxxxxxxxxxxxxx>
- Date: Thu, 16 Feb 2006 18:50:13 GMT
<sheldon.sc@xxxxxxxxx> wrote in message news:1140083367.168684.275960@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I need help with making a method to get a white circle with a black
background.
On clicking a button the circle turns to black On clicking the button
again it turns back to the white circle with a black background again.
import aLibrary.*;
import java.awt.event.*;
import java.awt.Color;
public class DotBW extends Dot{
private AOval theDot;
public DotBW(int a, int b){
super(a, b, 50, 50);
//theDot = new AOval();
setColor(Color.black);
}
public void action(){
Color fillColor = this.getColor();
if (fillColor == Color.black) {
this.setToFill();
//this.setColor(Color.white);
//this.setToFill(Color.white);
} else {
//this.repaint();
this.setColor(Color.black);
this.setToFill();
}
this.repaint();
}//end if
}//end class
Could it be that the code that draws a white circle is completely commented out?
- Oliver
.
- Follow-Ups:
- Re: Method for White Circle with black background
- From: sheldon . sc
- Re: Method for White Circle with black background
- References:
- Method for White Circle with black background
- From: sheldon . sc
- Method for White Circle with black background
- Prev by Date: Re: how to place the the exec file in system tray-windows..
- Next by Date: autodl of JRE 1.5
- Previous by thread: Re: Method for White Circle with black background
- Next by thread: Re: Method for White Circle with black background
- Index(es):