2c00L
2c00L

Reputation: 514

Jung: Add legends to the frame

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.

enter image description here

Upvotes: 1

Views: 570

Answers (1)

2c00L
2c00L

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);

enter image description here

Upvotes: 2

Related Questions