COMP2396
Loading...
Searching...
No Matches
SimpleAnimation Class Reference
Collaboration diagram for SimpleAnimation:

Classes

class  MyAnimPanel
 

Public Member Functions

void go ()
 

Static Public Member Functions

static void main (String[] args)
 

Detailed Description

Definition at line 4 of file SimpleAnimation.java.

Member Function Documentation

◆ go()

void SimpleAnimation.go ( )
inline

Definition at line 13 of file SimpleAnimation.java.

13 {
14 JFrame frame = new JFrame();
15 frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
16 MyAnimPanel animPanel = new MyAnimPanel();
17 frame.add(animPanel);
18 frame.setSize(300, 300);
19 frame.setVisible(true);
20 for (int i = 0; i < 130; i++) {
21 x++;
22 y++;
23 animPanel.repaint();
24 try {
25 Thread.sleep(50);
26 } catch (Exception ex) { }
27 }
28 } // close go() method

Referenced by main().

Here is the caller graph for this function:

◆ main()

static void SimpleAnimation.main ( String[] args)
inlinestatic

Definition at line 8 of file SimpleAnimation.java.

References go().

Here is the call graph for this function:

The documentation for this class was generated from the following file: