How can i set the Button location in LWUIT??
开发者_如何学编程   public void error()
  {
      error = new Dialog();
      e = new Label("EMPTY FIELDS!!!");
      t= new TextArea("You Can't Leave The Fields Empty...",8,13);
      error.addComponent(e);
      error.addComponent(t);
      eok = new Button("Ok");
      eok.setAlignment(Component.CENTER);
      eok.addActionListener(this);
      error.addComponent(eok);
      error.show();
  }
You need to use a layout manager. I'm guessing you are trying to center a button and not just align it to the center, just add it to a container with a center flow layout:
Container c = new Container(new FlowLayout(Component.CENTER));
c.addComponent(btn);
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论