Monday, January 16, 2012

J2ME with LWUIT (UI Toolkit Widgets) part 3

In this note, I would like to note down how to create a Ticker, Calendar
Any label can be configured as a Ticker.
  • Ticker
            Image ico = Image.createImage("/img/arrow.png");
            Label lblTicker = new Label("Hello! This is a Ticker!");
            lblTicker.setIcon(ico);

            Form frm=new Form();
            frm.addComponent(lblTicker);
            frm.show();
                    
            //finally
            lblTicker.startTicker(100, true);
  • Calendar
 
        Display.init(this);
        Calendar c=new Calendar();
        btn=new Button("Select Date");
        Label lblDate=new Label();

        Form frm=new Form();
        frm.addComponent(lblDate);
        frm.addComponent(c);
        frm.show();

0 comments:

Post a Comment

 
© Copyright 2035 kani.stack.notez
Theme by Yusuf Fikri