【发布时间】:2015-08-21 13:56:30
【问题描述】:
我使用 JLabel 向 JFrame 添加了背景图像。但是在特定 JFrame 中添加的面板中还有其他 JLabel。在整个 JFrame 中添加此背景图像后,其他 JLabel 不可见。如何让它们可见?
【问题讨论】:
-
你能提供一个minmal, working example吗?
-
@Pahan Madusha 您可以考虑不使用 JLabel 添加背景图像。如果我是你,我会将它添加到 JPanel 上。在 JPanel 上显示图像。之后,将其他组件添加到 JPanel。之后,将该 JPanel 添加到您的 JFrame 中。
标签: java swing user-interface background-image jlabel