public void actionPerformed(ActionEvent event)
	    {
	        for(int i = 0; i < buttons.size(); i++) {
	        	if(event.getSource() == buttons.get(i)) {
	        		frame.getContentPane().removeAll();
	        		imageicon = new JLabel[list[i].size()];
	        		
	        		JPanel p1=new JPanel();
	        		p1.setPreferredSize(new Dimension(1500,10000)); 
	        		for(int j = 0; j < list[i].size(); j++) {
	        		    String IMG_FILE_PATH = list[i].get(j);
	        		    BufferedImage myPicture = null;
						try {
							myPicture = ImageIO.read(new File(IMG_FILE_PATH));
						} catch (IOException e) {
							// TODO Auto-generated catch block
							e.printStackTrace();
						}
						imageicon[j] = new JLabel(new ImageIcon(myPicture));
	        		    Dimension size = new Dimension(myPicture.getWidth(), myPicture.getHeight());
	        		    imageicon[j].setSize(size);
	        		    p1.add(imageicon[j]);
	        		}
	        		JScrollPane p1scroller = new JScrollPane(p1,  
	                        ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,  
	                        ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS); 
	        		p1scroller.setPreferredSize(new Dimension(1000, 600));
	        		frame.add(p1scroller,BorderLayout.NORTH);
	        		frame.add(p2scroller,BorderLayout.SOUTH);
	        		frame.pack();
	        		frame.setVisible(true);
	        		frame.validate();
	        		frame.repaint();
	        	}
	        }
	    }