A Ticker is a piece of text that runs continuously across the display. The application model is that the ticker is always scrolling continuously.

Below is the illustration of Ticker.

 import javax.microedition.lcdui.*;
import javax.microedition.midlet.MIDlet;

public class TickerDemo extends MIDlet {
    String str = "How are you?";
    Form form;
    
    public TickerDemo() {
        form = new Form("Ticker");
    }
    
    protected void startApp() {
        Ticker t = new Ticker(str);
        form.setTicker(t);
        Display.getDisplay(this).setCurrent(form);
    }
    
    protected void destroyApp(boolean unconditional) {}
    
    protected void pauseApp() {}
}

 

 

 Related Tips