用多线程实现两行文字的移动
源代码在线查看: tickertest.java
import java.awt.event.*;
import java.awt.*;
public class TickerTest extends Frame
{ private Ticker ticker=new Ticker("testing the ticker tape class");
// private Ticker2 ticker2=new Ticker2("testing the ticker tape class");
public TickerTest()
{
setLayout(new BorderLayout());
add("North",ticker);
//add("South",ticker2);
addWindowListener(new WindowAdapter()
{public void windowClosing(WindowEvent we)
{System.exit(0);}
});
setSize(300,200);
show();
}
public static void main(String[] args)
{TickerTest aa=new TickerTest();
}
}