|
-
Jul 31st, 2006, 08:55 PM
#1
Thread Starter
New Member
Timer Class to flicker the color of the numbers
i have wrote most of my sudoku code including the gui. i need help flickering two colors for a solved row, col, or 3*3 box. i have a writeNumber method that will probably make the new method easier(it takes the logical x/y coordinates and translate them into phyiscal coordinates.). i am very new to the timer class and i know i need it for this feature. i also think i need another method to detect a row,col, or the box being solve.
Here is the writeNumber method:
private void writeNumber(Graphics g, byte x, byte y, String number, Color color)
{
final int factor = 40;
g.setFont(new Font("Serif", Font.BOLD, 30));
g.setColor(color);
if (!number.equals(""))
{
byte temp = Byte.parseByte(number);
g.drawString(String.valueOf(temp), 12 + x * factor, 30 + y * factor);
}
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|