tickerdemo.java

来自「Java手机-PDA程序设计入门源代码.rar」· Java 代码 · 共 41 行

JAVA
41
字号
/* * @(#)TickerDemo.java	1.3 02/11/03 * * Copyright (c) 2000-2002 Sun Microsystems, Inc. All rights reserved.  * PROPRIETARY/CONFIDENTIAL * Use is subject to license terms */package ticker;import javax.microedition.lcdui.*;import javax.microedition.midlet.MIDlet;/** * The Ticker Demo simply sets a rather long ticker to the screen. * * @version 2.0 */public class TickerDemo extends MIDlet {    /**     * This is the text displayed in the ticker.     */    private static final String TICKER_TEXT = "This is a ticker see it " +                    "scroll along the way... On and on it goes without " +                    "stoping even for a second!";    protected void startApp() {        Form mainForm = new Form("Ticker");        Ticker t = new Ticker(TICKER_TEXT);        mainForm.setTicker(t);               Display.getDisplay(this).setCurrent(mainForm);            }        protected void destroyApp(boolean unconditional) {            }        protected void pauseApp() {    }    }

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?