Microsoft Visual J++. Java


- 4


}

catch (InterruptedException e)

{

}

// ,

//

//

if (!m_fAllLoaded)

{

stop();

m_Graphics.drawString(

" ",

10, size().height / 2);

return;

}

//

m_nImgWidth = m_Images[0].getWidth(this);

m_nImgHeight = m_Images[0].getHeight(this);

}

//

repaint();

 

//

while (true)

{

try

{

//

displayImage(m_Graphics);

 

//

m_nCurrImage++;

 

// ,

//

if(m_nCurrImage == NUM_IMAGES)

m_nCurrImage = 0;

 

// 30

Thread.sleep(30);

}

//

// ,

catch (InterruptedException e)

{

stop();

}

}

}

}

4.8 HTML, CDRotation.

4.8. CDRotation\CDRotation.html

<html>

<head>

<title>CDRotation</title>

</head>

<body>

<hr>

<applet

code=CDRotation.class

id=CDRotation

width=320

height=240 >

</applet>

<hr>

<a href="CDRotation.java">The source.</a>

</body>

</html>