public LegendPanel(){
  setLayout(new BorderLayout(0,0));
  scrollPane=new JScrollPane(legendImagePanel);
  scrollPane.setAutoscrolls(true);
  scrollPane.setPreferredSize(new Dimension(SCROLL_PANE_WIDTH,SCROLL_PANE_HEIGHT));
  add(scrollPane,BorderLayout.CENTER);
}

public LegendPanel ( ) { setLayout ( new BorderLayout ( 0 , 0 ) ) ; scrollPane = new JScrollPane ( legendImagePanel ) ; scrollPane . setAutoscrolls ( true ) ; scrollPane . setPreferredSize ( new Dimension ( SCROLL_PANE_WIDTH , SCROLL_PANE_HEIGHT ) ) ; add ( scrollPane , BorderLayout . CENTER ) ; }
instantiates a new legend panel .
