public void actionPerformed(ActionEvent e) {
		if ("look".equals(e.getActionCommand())) 
		{

			try
			{
				LinkedHashMap<String, Integer> map = getLikelyTypeMap(scroll, triples, term.getText());

				System.out.println(map.toString());
				results.setText("<HTML>"+
						map.toString()
						.substring(1, map.toString().length()-1)
						.replaceAll(",", ")<br>")
						.replaceAll("=", "(")+
				")</HTML>");
				frame.repaint();

				if(chartFrame.isShowing()){
					chartFrame.setVisible(false);
					chartFrame.remove(cp);
				}

				pieData = new DefaultPieDataset();

				for(Entry<String, Integer> entry : map.entrySet()){
					pieData.setValue(entry.getKey(), entry.getValue());
				}
				chart=null;
				chart = ChartFactory.createPieChart3D("Chart of probable types", pieData, true, true, false);
				PiePlot3D plot = (PiePlot3D) chart.getPlot();
		        plot.setStartAngle(290);
		        plot.setDirection(Rotation.CLOCKWISE);
		        plot.setForegroundAlpha(0.8f);
		        plot.setNoDataMessage("No data to display");
		        
		        cp=null;
		        cp = new ChartPanel(chart);
		        cp.setPreferredSize(new Dimension(830 ,590));
		        chartFrame.add(cp);
		        chartFrame.setBounds(410, 200, 840, 600);
		        chartFrame.pack();
		        chartFrame.setVisible(true);

			}
			catch(Exception ex){
				results.setText(ex.getMessage());
			}

			frame.repaint();
		}
	}