星空网 > 软件开发 > Java

JavaFx开发的图表实例

1.import javafx.application.Application;2.import javafx.collections.FXCollections;3.import javafx.collections.ObservableList;4.import javafx.scene.Scene;5.import javafx.stage.Stage;6.import javafx.scene.chart.*;7.import javafx.scene.Group;8. 9.public class PieChartSample extends Application {10. 11.  @Override public void start(Stage stage) {12.    Scene scene = new Scene(new Group());13.    stage.setTitle("Imported Fruits");14.    stage.setWidth(500);15.    stage.setHeight(500);16. 17.    ObservableList<PieChart.Data> pieChartData =18.        FXCollections.observableArrayList(19.        new PieChart.Data("Grapefruit", 13),20.        new PieChart.Data("Oranges", 25),21.        new PieChart.Data("Plums", 10),22.        new PieChart.Data("Pears", 22),23.        new PieChart.Data("Apples", 30));24.    final PieChart chart = new PieChart(pieChartData);25.    chart.setTitle("水果");26........

JavaFx开发的图表实例




原标题:JavaFx开发的图表实例

关键词:JAVA

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流