gpt4 book ai didi

java - Codenameone FloatingHint 问题

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:40:08 26 4
gpt4 key购买 nike

尝试使用 Codename One FloatingHint 类,但在运行应用程序时我得到一个 java.lang.IllegalArgumentException: Component is already contained in Container。这是我的实现

Form f = new Form(new BoxLayout(BoxLayout.Y_AXIS));
TextField hintTest= new TextField(11);
hintTest.setHint("The hint");
new FloatingHint(hintTest);
addComponent(hintTest);

最佳答案

设法让它与

一起工作
    TextField hintTest= new TextField(11);
hintTest.setHint("The Hint");
FloatingHint x = new FloatingHint(uname);
addComponent(x);

关于java - Codenameone FloatingHint 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34692093/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com