1
我在SWT中使用JFreeChart,並想要如here所述設置漸變背景到DialPlot。 但我總是得到一個白色的背景。JFreeChart DialPlot GradientBackground
GradientPaint gradient = new GradientPaint(new Point(), Color.white, new Point(), Color.darkGray);
DialBackground background = new DialBackground(gradient);
background.setGradientPaintTransformer(new StandardGradientPaintTransformer(GradientPaintTransformType.VERTICAL));
StandardDialFrame frame = new StandardDialFrame();
frame.setBackgroundPaint(Color.lightGray);
frame.setForegroundPaint(Color.darkGray);
// some layers
DialPlot plot = new DialPlot(getDataset());
plot.setDialFrame(frame);
plot.setBackground(background);
的什麼,我做錯了什麼建議?