我在使用时遇到问题getTime()
。该方法是从另一个类传递并使用System.currentTimeMillis()
. 有人能帮我吗?我真的很感谢你的帮助。谢谢你。
panelGraph = new JPanel();
panelGraph.setLayout(new BorderLayout());
aesDataset = XYDataset(caes.getTimeTotal());
JFreeChart chart = ChartFactory.createTimeSeriesChart(
"Graph: Encrypted Result", "SetFile", "Time", aesDataset, true, true, false);
chart.setBackgroundPaint(Color.green);
XYPlot plot = (XYPlot) chart.getPlot();
plot.setOrientation(PlotOrientation.VERTICAL);
plot.setBackgroundPaint(Color.lightGray);
plot.setDomainGridlinePaint(Color.white);
plot.setRangeGridlinePaint(Color.white);
plot.setAxisOffset(new RectangleInsets(5.0, 5.0, 5.0, 5.0));
XYItemRenderer renderer = plot.getRenderer();
renderer.setSeriesPaint(0, Color.red);
NumberAxis yAxis1 = (NumberAxis) plot.getRangeAxis();
yAxis1.setTickLabelPaint(Color.red);
ChartPanel frame1 = new ChartPanel(chart);
frame1.setSize(400, 300);
panelGraph.add(frame1);