简体   繁体   中英

(Java) How do I use tabs to switch between different icons for a JLabel?

I have a program that has icons in JLabels. I want to be able to switch between different icons for the JLabel by clicking between different tabs. (There would be two images per label, and preferably I'd be able to attach the tabs right above the label). From what I've read, I would want to use a JTabbedPane, but how would I implement it in this way?

我想通了,我只能在自己的面板中使用不同的标签。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM