J卡列表?
获得页面图像后,我想将它们呈现在列表中,以便用户可以选择要播放的页面。我知道 JList 确实支持图像,但这会显示整个图像,失去卡片组的感觉。也许我只会显示图像的边缘及其名称,并以某种方式突出显示它。
有什么想法吗?
This is related to: How to make a dynamic image at run time?
After I have the page images I would like to present them in a list so the user can select the page to play. I know JList do support images but that would display the whole image losing the card deck feeling. Probably I would only show the edge of the image with its name and highlight it somehow.
Any idea?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我能够把它拉出来。您可以在此处从此代码中获取图像:http://leepoint。 net/notes-java/examples/graphics/cardDemo/cards20.zip
Card.java
CardCellRenderer.java
Test.java
以下是输出:
I was able to pull it out. You can get the images from this code here: http://leepoint.net/notes-java/examples/graphics/cardDemo/cards20.zip
Card.java
CardCellRenderer.java
Test.java
Here's the output:
指针:您可以使用Layerd Pane
您可能必须打破 JList 的思维定势,然后根据您的 UI 需求考虑不同的组件。您不能在
JList
中使用LayeredPane
(是的,您可以,但不能没有 10K 行的复杂性和错误)。备用指针 - 如果您必须使用 JList,请考虑 这篇文章
Pointer: You may use Layerd Pane
You may have to break your mind-set with JList and then think of a different component, based on your UI needs. You can not use a
LayeredPane
inside aJList
(yes you can, but not with out 10K lines of complexity and bugs).Alternate Pointer - if you so have to use JList, consider this SO post