protected class SwingTimer.Motion extends Object implements ActionListener
It randomly repositions the dot within the
panel by changing SwingTimer.xPos
and
SwingTimer.yPos
. After this the
repaint method of the panel causes the
contents to be repainted using the
SwingTimer.MyPanel.paintComponent(Graphics)
method.
Modifier | Constructor and Description |
---|---|
protected |
Motion() |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e) |
protected Motion()
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
Copyright © 2017. All rights reserved.