让程序自动添加java中的文本字段
也许有一个类似的问题,但我找不到。
我希望我的程序( awt 或 swing )自动添加控件(如文本字段)。
例如:一个对话框程序有 10 个用于输入名称的字段,但我需要 11 个,因此按下按钮就会出现一个新字段。
先感谢您。
Maybe there is a similar question to this, but I couldn't find a one.
Id like my program ( awt or swing ) to add controls ( like text fields ) automatically.
For example : A dialog program has 10 fields for inputting names, but I need 11 so by pressing a button a new field will appear.
Thank you in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是使用
Box
的示例:Here is an example using
Box
:以下是您的问题的一些有用的重复项:
Here are some useful Duplicates of your question: