I'm trying to have the background color of the Applet change when there is a mouse click. (Randomly) I've tried: //----- public void mouseClicked(MouseEvent e) { mouseX = 0; mouseY = 0; msg ="Mouse Clicked." ; setBackground(Color.green); repaint(); } //---- Do I use math.random ? Do I need to use RGB numbers? Jo
I'm not sure what this has to do with OO Programming, though, so I expect someone will come along and move this to Java in General(Beginner), or Applets... HTH, -Nate
-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Jo Eagle
Greenhorn
Joined: Feb 14, 2001
Posts: 13
posted
0
Thank you for your help - I'll give it a try. -Jo Sorry for posting this in the wrong section - new to this great site and new to java - trying to teach myself.
John Wetherbie
Rancher
Joined: Apr 05, 2000
Posts: 1441
posted
0
I'll move this to the Applets forum. John
The only reason for time is so that everything doesn't happen all at once.
- Buckaroo Banzai