×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Apr 2009
    Posts
    17

    LWUIT accessing components within forms

    OK.. I'm learning this, but am finding it a tad confusing sortingout the command listener.
    Using one of the tutorial examples:
    Form f = new Form("My Form");
    Button button = new Button("Push me!");
    final Label countLabel = new Label(" ");
    f.addComponent(countLabel);
    button.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent ae) {
    c++;
    countLabel.setText(Integer.toString(c));
    f.layoutContainer();
    }
    });
    Basically the 'countLabel' does not ever have text updated.
    How do i modify, or read for that matter, a component added to the form?
    Thanks
    David

  2. #2
    Registered User
    Join Date
    Apr 2009
    Posts
    17

    Re: LWUIT accessing components within forms

    dont worry, its working now.. tuh!

Similar Threads

  1. Maintaining Forms flow/navigation
    By viku_006 in forum Mobile Java General
    Replies: 5
    Last Post: 2009-10-01, 13:38
  2. Why can't higher level components work on Canvas?
    By KevinBoyd in forum Mobile Java General
    Replies: 2
    Last Post: 2009-09-28, 09:09
  3. lwuit and j2me
    By Arunesh in forum Mobile Java General
    Replies: 16
    Last Post: 2009-09-12, 15:49
  4. Problem with Forms. Please help me!!
    By aangel1965 in forum Mobile Java General
    Replies: 3
    Last Post: 2006-05-03, 12:38

Posting Permissions

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