Reputation: 514
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.
Upvotes: 1
Views: 570
Reputation: 514
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);
Upvotes: 2