Embarrassment. I think that's my middle name.
Tonight I was teaching Java Graphics and Event Handlers. To illustrate Java graphics I used a timer that would create the illusion of moving a ball across a frame by incrementing the x and y coordinates of the ball by 3 pixels every 25 milliseconds. The event handler would just repaint the screen.
Here is a snippet of my code:
.....
public class MovingBall extends JPanel
{
//Code here to create variables
MovingBall()
{
//Constructor
}
//Create inner class for event handler
private class BallHandler implements ActionListener
{
.....
Oh my.
Tuesday, October 11, 2011
Subscribe to:
Post Comments (Atom)
3 comments:
Ok that is Greek to me! Nana
Unfortunately for you, I'm sending this to my programmer BIL so he can get a good laugh out of this. i did notice the ball handler and did laugh, but I'm pretty sure I don't appreciate this as much as you would, :) I'm sure the class (if they saw it already) loved it. "She's the best teacher ever!!"
I'm glad you saw my mistake. I can't believe I didn't realize that :). Tell your BIL that normally I use better names for my classes :)
Post a Comment