/*Old code don't delete quite yet... inetChart  = ChartFactory.createXYLineChart("Internet Usage", "", "KB/s", collection, PlotOrientation.VERTICAL, true, true, false);
enableInetMonitoring = new JToggleButton(Main.getMessage("enable_inet_monitoring")); enableInetMonitoring.setActionCommand("toggleInetMonitoring"); enableInetMonitoring.addActionListener(this); enableInetMonitoring.setSize(new Dimension(200,30)); if(Main.getProperty("inet.monitoring", "false").equals("true")){ enableInetMonitoring.setSelected(true); setTimer(); }else{ enableInetMonitoring.setSelected(false); }
	public JPanel createInternetPanel(){		JPanel inetPanel = new JPanel();		inetPanel.setLayout(new BorderLayout());				inSeries = new XYSeries("In");		inSeries.add(System.currentTimeMillis(), 0.0);		outSeries = new XYSeries("Out");		outSeries.add(System.currentTimeMillis(), 0.0);				collectionIn = new XYSeriesCollection();		collectionIn.addSeries(inSeries);				collectionOut = new XYSeriesCollection();		collectionOut.addSeries(outSeries);				//create the filled chart plot		XYDataset data1 = collectionIn;		XYItemRenderer renderer1 = new XYAreaRenderer(XYAreaRenderer.AREA);		renderer1.setToolTipGenerator(				new StandardXYToolTipGenerator(		                StandardXYToolTipGenerator.DEFAULT_TOOL_TIP_FORMAT,		                new SimpleDateFormat("yy"), new DecimalFormat("0.0")		        )		);		//setup the other chart options		DateAxis domainAxis = new DateAxis();		domainAxis.setTickLabelsVisible(false);		domainAxis.setTickMarksVisible(false);		ValueAxis rangeAxis = new NumberAxis("KB\\s");		renderer1.setPaint(Color.GREEN);		XYPlot plot = new XYPlot(data1, domainAxis, rangeAxis, renderer1);				//create the line chart plot		XYDataset data2 = collectionOut;		XYItemRenderer renderer2 = new StandardXYItemRenderer();		renderer2.setToolTipGenerator(	            new StandardXYToolTipGenerator(	                StandardXYToolTipGenerator.DEFAULT_TOOL_TIP_FORMAT,	                new SimpleDateFormat("yy"), new DecimalFormat("0.0")	            )	    );				plot.setDataset(1, data2);		plot.setRenderer(1, renderer2);		plot.setDatasetRenderingOrder(DatasetRenderingOrder.FORWARD);				//finally create the chart object and post it to the panel		inetChart =  new JFreeChart("Internet Usage", JFreeChart.DEFAULT_TITLE_FONT, plot, true);		inetChart.setAntiAlias(true);		ChartPanel cp = new ChartPanel(inetChart);		inetPanel.add(cp, BorderLayout.CENTER);				/*Old code don't delete quite yet...		inetChart  = ChartFactory.createXYLineChart("Internet Usage", "", "KB/s", collection, 				PlotOrientation.VERTICAL, true, true, false);		inetChart.getXYPlot().getDomainAxis().setTickLabelsVisible(false);		inetPanel.setSize(this.getWidth(), (this.getHeight()/2));		ChartPanel cp = new ChartPanel(inetChart);		cp.setSize(this.getWidth(), (this.getHeight()/2));				inetPanel.add(cp, BorderLayout.CENTER);		*/				//we don't want to draw the chart every single time		inSeries.setNotify(false);		outSeries.setNotify(false);				return inetPanel;	}