1

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

2c00L
  • 495
  • 12
  • 29

1 Answers1

2

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

2c00L
  • 495
  • 12
  • 29