在运行时更改LayoutConstraint代码名1
我有一个带有BorderLayout的容器和一个带有LayoutConstraint=“South”的按钮。如何在运行时将其更改为“北”?从容器中删除该组件,然后再次将其添加到北。调用在运行时更改LayoutConstraint代码名1,layout,constraints,codenameone,Layout,Constraints,Codenameone,我有一个带有BorderLayout的容器和一个带有LayoutConstraint=“South”的按钮。如何在运行时将其更改为“北”?从容器中删除该组件,然后再次将其添加到北。调用revalidate()或者更好的调用animateLayout() myBorderContainer.removeComponent(button); myBorderContainer.addComponent(BorderLayout.NORTH, button); myBorderContainer.an
revalidate()
或者更好的调用animateLayout()
myBorderContainer.removeComponent(button);
myBorderContainer.addComponent(BorderLayout.NORTH, button);
myBorderContainer.animateLayout(300);