×

Discussion Board

Results 1 to 2 of 2

Thread: LWUIT

  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    24

    LWUIT

    Hi can any one help me . here i am displaying my code
    import javax.microedition.midlet.*;
    import com.sun.lwuit.*;
    import com.sun.lwuit.events.*;
    import com.sun.lwuit.layouts.*;
    public class LoginThemeMidlet extends MIDlet implements ActionListener
    {
    private Form form;
    private Container formContainer;
    private Label uName;
    private Label pwd;
    private TextArea uNameText;
    private TextArea pwdText;
    public void startApp()
    {
    Display.init(this);
    form=new Form("Login LWUIT form");
    form.setLayout(new BorderLayout());
    formContainer=new Container(new BoxLayout(BoxLayout.Y_AXIS));

    uName=new Label("UserName");
    TextField uname=new TextField();
    uname.setConstraint(TextArea.ANY);

    pwd=new Label("PassWord");
    TextField pwd1=new TextField();
    pwd1.setConstraint(TextArea.PASSWORD);

    formContainer.addComponent(uName);
    formContainer.addComponent(uname);
    formContainer.addComponent(pwd);
    formContainer.addComponent(pwd1);

    form.addComponent(BorderLayout.CENTER, formContainer);
    form.show();

    }
    public void pauseApp()
    {

    }
    public void destroyApp(boolean unconditional)
    {
    notifyDestroyed();
    }
    public void actionPerformed(ActionEvent arg0)
    {
    throw new UnsupportedOperationException("Not supported yet.");
    }

    }

    code is working fine. but when i am entering the fields of UserName and PassWord it displaying left side "CLEAR" and right side "T9" so i don't want to display them what should i do?????

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    Re: LWUIT

    when i am entering the fields of UserName and PassWord it displaying left side "CLEAR" and right side "T9" so i don't want to display them what should i do?????
    try TextField.setReplaceMenu(false) to remove Clear and T9 from menu in your textfields uname and pwd1.

    thanks,
    ~Amitabh

Similar Threads

  1. Replies: 2
    Last Post: 2010-06-23, 13:50
  2. Replies: 0
    Last Post: 2010-04-20, 12:25
  3. LCDUI Alert on an LWUIT Form
    By slugger_2003 in forum Mobile Java General
    Replies: 0
    Last Post: 2010-04-18, 13:01
  4. lwuit and j2me
    By Arunesh in forum Mobile Java General
    Replies: 16
    Last Post: 2009-09-12, 15:49
  5. lwuit
    By mahesh_aquarius in forum Mobile Java General
    Replies: 8
    Last Post: 2009-02-20, 13:03

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×