摆动从弹出式表中获取用户输入
我想创建一个弹出用户输入getter,该弹出式getter将显示一个具有多个文本行的表格。
例如,我想要一个带有10行文本行的窗口和左侧的标签,说明每个条目是什么,并且希望用一些默认值填充它。
这可能是摇摆吗?
I want to create a popup user input getter that will show a table like field with multiple text lines.
As an example, I would want a window with 10 rows of text lines and a label to the left side saying what each entry is, and would want to populate it with some default value.
Kind of like this but just the left table and I can modify the white boxes and press confirm.
Is this possible in Swing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
带有本教程,我能够看到您要寻找的大部分内容,但是它要求名称以对象数组的形式登上顶部:
这似乎是在JTable(列而不是行)。您提到左侧的标签,说每个条目是什么,这给了我使用HTML标签的想法,如下所示:
,因为我在该页面上看不到它,所以我会包含更多信息。为了有多行,您需要使用
< br>
(break)这样:或者您可以将表格设置为一列宽,而不是所需的,为
rowdata设置内容[RowIndex] [0]
是描述,并避免编辑。With this tutorial, I was able to see most of what you are looking for, but it is asking for the names to go on the top with the Object Array like so:
It appears that may be the only way to set names in a JTable (column instead of by row). You mentioned a label to the left side saying what each entry is and that gave me the idea of using the html tag as shown here:
And because I don't see it on that page, I'll include one more piece of information. In order to have multiple lines, you will need to use
<br>
(break) like so:Or you could set the table one column wider than you need, set the contents for
rowData[rowIndex][0]
to be the description, and keep that from being edited.