Java Swing 如何创建一个根据用户输入更新的文本框?

发布于 2025-01-16 14:59:38 字数 150 浏览 3 评论 0原文

我正在创建一个图书跟踪应用程序,用户在其中输入一本书,输入后,书名将显示在屏幕上。

我一直在网上搜索哪种组件能够为我执行此操作,但我找不到任何内容。 JTextArea 不起作用,因为用户可以直接写入它,这是我不想要的。我希望用户完成书本输入后文本框会发生变化......

I'm creating a Book Tracking application where the user enters in a book and once entered, the book name will show up on the screen.

I've been searching the web for what kind of component would be able to do this for me and I can't find anything. JTextArea doesn't work because the user can write into it directly which I dont want. I want the text box to change once the user has finished entering in a book....

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文