荣格:将图例添加到框架中 [英] Jung: Add legends to the frame
本文介绍了荣格:将图例添加到框架中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要在图例中添加图例以显示不同颜色的链接和节点的含义. Jung是否有一些内置的图例功能?还是我需要在右侧添加一个额外的面板来制作自己的面板.
I need to add legends to my frame to show the meaning of different colored links and nodes. Does Jung have some in built legend functionality? Or do I need make my own by adding an extra panel to the right.
推荐答案
我以简单的方式添加了图例.首先制作图例的图像,然后通过JLabel将其粘贴到面板上.
I added the legends in a simple way. First made an Image of the legends and then stick it to the panel via the JLabel.
JLabel label = new JLabel();
label.setOpaque(true);
label.setBackground(Color.WHITE);
ImageIcon icon = new ImageIcon("Legend/SyncLegend.png");
label.setIcon(icon);
vv.add(label);
这篇关于荣格:将图例添加到框架中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文