In FindLocation2, have 2 textfields, and if the mouse is moved around the screen the coordinates appear in each textfield. If the mouse is dragged (meaning button is down), have the buttons change background color. [textfield1.setBackground(Color.green);]
Create SnowMan that has a small SnowMan follow the cursor
around (draw on temporary layer Graphics g=getTempG() ). (A snowman could be just three circles on top of each other - or an image)
In AnnoyTheUser have a circle that appears at a random
location. When the user moves the cursor close to the circle (say within
30 pixels), the circle will move to a new random location. Fun.
Code for finding distance to center of circle
public double distanceToCenter(int centerX, int centerY, int mouseX, int mouseY)
Code for drawing originally in the program
public void paintScreen (Graphics g)
//draw on g here
In Rainbow have a rainbow of colors appear when the user moves the mouse. It will be beautiful; kind of like a rainbow.Use g.setColor(Color.blue) or any color Have a reset button.
In drawDynamicRect that when the user presses down and then drags their mouse it will constantly draw (and erase) a rectangle that is that size. When they release the mouse, it will finalize that rectangle. (code will be in mousepressed, mousedragged and mousereleased) [advanced - have it work in any direction]//Code to get a random color
In Gradient that when the mouse is moved left or right, it will adjust the amount of red in the background. If it goes up or down, it will adjust the amount of green.g.setColor(new Color(r,g,b) where r,g,b are the amount of red green and blue)
In ConstantLine when the mouse is pressed it will start drawing a new line and connect the dots to make the line like good. (so there is no gaps). Each time they press down, a new line will be drawn.
In Operation, there will be a square inside a square. The idea of the game is that the user must move their mouse around the inside of the square without hitting the walls. It will keep track of how much time it takes for them to accomplish this goal. Put this inside paintScreen:
You probably will want to have a global int corner; Where whenever they make it to a corner it will change which corner you need to hit next. This is hard, but oh what a fun game it would be.
That part is required. Additional ideas:
give them 2 seconds to get in the safe region originally.