×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jan 2013
    Posts
    9

    Auto Scrolling in LWUIT for S40 Container

    Here is my code. I want the 20th Label be visable, anyone knows how to accomplish it.

    another post Auto Scrolling in LWUIT Container says componentOfLastContainer.requestFocus(); centerBigContainer.repaint(); will work,but it seems not work for me. I need Your help ,thanks
    Code:
    public class TestView extends Form{
    private TextArea inputText;
    private Container chatScreen = new Container(new BoxLayout(BoxLayout.Y_AXIS));
    
    public TestView () {
        super("test", null);
        setupUI();
            }
    
    void setupUI() {
        setLayout(new BorderLayout());
        setScrollable(false);
        chatScreen.setScrollableY(true);
        addComponent(BorderLayout.CENTER, chatScreen);
        inputText = new TextArea(2, this);
        inputText.setGrowByContent(true);
        inputText.setMaxSize(1000);
        Container sendContainer = new Container(new BorderLayout());
        sendContainer.addComponent(BorderLayout.CENTER, inputText);
        addComponent(BorderLayout.SOUTH, sendContainer);
    
    
        for (int i = 0; i < 20; i++) {
            Label l = new Label("sdjfksjfksjd" + i);
            c = new Container();
            c.addComponent(l );
            chatScreen.addComponent(c);
        }
    
      c.requestFocus();
    
      chatScreen.repaint();
    
    
        Display.getInstance().callSerially(new Runnable(){
    
                public void run() {
                      c.requestFocus();
    
                     chatScreen.repaint();
                }
            });
    
    
    }
    Last edited by wizard_hu_; 2013-01-14 at 13:23. Reason: added [CODE][/CODE] for preserving indentation

  2. #2
    Registered User
    Join Date
    Jan 2013
    Posts
    9

    Re: Auto Scrolling in LWUIT for S40 Container

    I also post it on http://stackoverflow.com/questions/1...0-container。 And Shai Almog reply,says this mothod is ok. But I don't know why it doesn't work on Lwuit for s40。Thanks very much for any reply

Similar Threads

  1. LWUIT Table Scrolling
    By rajan701v in forum Mobile Java General
    Replies: 3
    Last Post: 2011-03-16, 08:56
  2. Scrolling Multiple labels in a Container
    By marvik_34 in forum Symbian
    Replies: 1
    Last Post: 2011-03-16, 08:05
  3. Form not scrolling in Lwuit
    By gaurav.gupta in forum Mobile Java General
    Replies: 1
    Last Post: 2010-08-29, 15:51
  4. lwuit scrolling
    By m-lamaa in forum Mobile Java General
    Replies: 3
    Last Post: 2010-05-27, 15:43
  5. Scrolling container
    By kumar_sai123 in forum Symbian User Interface
    Replies: 0
    Last Post: 2009-01-06, 05:06

Posting Permissions

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