使用 Java Swing 的 JPanel 内的面板
我试图用 Java 创建类似于 TweetDeck 的 UI。
我想这些列相当于面板,而且显示的时间线也相当于面板。所以我猜有很多面板。
我试图制作这样的用户界面,但失败了。我对 Java Swing 不太感兴趣,所以我尝试使用 Netbeans 框架创建它。
有没有简单的Java代码可以解决我的一些问题?
我想这里的一切都应该是动态的。
如果我对此处的面板有误(因为我猜太多面板会产生问题),请指导我。
I was trying to create UI similar to TweetDeck in Java.
I guess the columns are equivalent to panels and also the timeline shown is also equivalent to panels. So I guess there are many panels.
I was trying to make such UI, but failed. I am not much into Java Swing so I tried to create it using Netbeans framework.
Is there any simple Java code that can solve some of my problems?
I guess everything should be dynamic here.
If I am wrong about panels here (because I guess too many panels can create problems) please guide me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有三种选择:
最简单、更一致的是使用大量 JPanels(每个都包含 JComponents) GridLayout 内 JScrollPane
put
JPanels
(每个包含JComponents
) 是一个 JTable < /p>将概述
JPanels
(每个都包含JComponents
)放在 JListThere are three choices:
Easiest and more conformable is to use lots of JPanels (that each contain JComponents) laid by GridLayout inside JScrollPane
put
JPanels
(that each containJComponents
) is a JTableput overview
JPanels
(that each containJComponents
) in a JList我建议将每个列实现为 JList,因为看起来您希望您的列具有可滚动内容。请参阅如何使用列表。
I would recommend to implement every column as a JList instead since it looks like you want your columns to have scrollable content. See How to Use Lists.