⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tickerdemo.java

📁 这是 Screen 类的画布 包括各种类的的使用
💻 JAVA
字号:
/* * @(#)TickerDemo.java	1.5 03/01/22 * * Copyright (c) 2000-2003 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!";    //默认字符串    private boolean firstTime;    private Form mainForm;   //窗体    public TickerDemo() {        firstTime = true;        mainForm = new Form("Ticker");  //初始化    }    protected void startApp() {        if(firstTime) {            Ticker t = new Ticker(TICKER_TEXT);            mainForm.setTicker(t);   //            firstTime = false;        }        Display.getDisplay(this).setCurrent(mainForm);    }    protected void destroyApp(boolean unconditional) {    }    protected void pauseApp() {    }}

⌨️ 快捷键说明

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