Microsoft Visual J++. Java


- 4


s[0] = m_String1;

s[1] = m_String2;

s[2] = m_String3;

s[3] = m_String4;

s[4] = m_String5;

s[5] = m_String6;

 

//

Graphics g = getGraphics();

Dimension dimAppWndDimension = size();

 

//

FontMetrics fm = g.getFontMetrics();

 

//

yChar = fm.getHeight();

 

//

while (true)

{

try

{

// ⠠

ShiftsCounter++;

 

// ,

//

if(ShiftsCounter == yChar + 5)

{

//

ShiftsCounter = 0;

// ,

// -

if(CurrentStr == 0)

g.setColor(Color.red);

else

g.setColor(Color.black);

 

//

g.drawString(s[CurrentStr],

10, dimAppWndDimension.height - 10);

//

CurrentStr++;

 

// ,

//

if(CurrentStr > 5)

CurrentStr = 0;

}

 

//

yShift = 1;

 

//

g.copyArea(0, yShift + 1,

dimAppWndDimension.width - 1,

dimAppWndDimension.height - 1,

0, -yShift);

 

//

g.setColor(Color.yellow);

 

g.fillRect(1, dimAppWndDimension.height

- yShift - 1,

dimAppWndDimension.width - 2,

dimAppWndDimension.height - 1);

// 50