|
Creating "Nifty" Assignments for Java Programming Courses
and a Discussion of the Necessary Aspects of Java |
|
Prof. David Bernstein
|
| Computer Science Department |
| bernstdh@jmu.edu |
JButton Objects
ActionEvent
ActionListener
void actionPerformed(ActionEvent event)
setFont method in
Graphics2D
Line Metrics
The x and y passed to
drawString(String s, float x, float y) are the left end
of the baseline.
public void paint(Graphics g)
methodJComponent which does very little in its
paint() method
Timer object that sends
actionPerformed() messagesActionListener on the Timer
that updates state information each "tick"JComponent that renders itself using the
state information