-
大小: 455KB文件類型: .zip金幣: 2下載: 0 次發(fā)布日期: 2021-05-13
- 語言: Java
- 標簽:
資源簡介
有6個題目,分別是:一元多項式計算器、數(shù)據(jù)壓縮與解壓(用FX畫二叉樹)、手機模擬通訊錄(有FX界面)、24點游戲(有FX界面)、教學計劃編制、交通管理系統(tǒng)。

代碼片段和文件信息
package?test_3_version_1;
import?javafx.application.Application;
import?javafx.geometry.Insets;
import?javafx.geometry.Pos;
import?javafx.scene.Scene;
import?javafx.scene.control.Button;
import?javafx.scene.control.Label;
import?javafx.scene.control.TextField;
import?javafx.scene.image.Image;
import?javafx.scene.image.ImageView;
import?javafx.scene.layout.*;
import?javafx.scene.text.Font;
import?javafx.scene.text.FontWeight;
import?javafx.scene.text.Text;
import?javafx.stage.Stage;
import?java.util.Random;
import?java.util.Stack;
public?class?Version_1?extends?Application?{
????public?static?void?main(String[]?args)?{
????????launch(args);
????}
????//卡牌數(shù)組
???public?int[][]?plate?=?new?int[4][2];
???public?HBox?hBox_1?=?new?HBox(5);
???public?HBox?hBox_2?=?new?HBox(5);
????@Override
????public?void?start(Stage?primaryStage)??{
????????draw(primaryStage);
????}
????//界面繪畫
????public?void?draw(Stage?stage)?{
????????Pane?root?=?new?Pane();
????????VBox?vBox?=?new?VBox(5);
????????vBox.setAlignment(Pos.CENTER);
????????hBox_1.setPadding(new?Insets(5?5?5?5));
????????hBox_1.setAlignment(Pos.baseLINE_RIGHT);
????????hBox_2.setPadding(new?Insets(5?5?5?5));
????????HBox?hBox_3?=?new?HBox(5);
????????hBox_3.setPadding(new?Insets(5?5?5?5));
????????vBox.getChildren().addAll(hBox_1?hBox_2?hBox_3);
????????root.getChildren().add(vBox);
????????Button?btn_Refresh?=?new?Button(“Refresh“);
????????btn_Refresh.setMinHeight(40);
????????btn_Refresh.setMinWidth(120);
????????hBox_1.getChildren().add(btn_Refresh);
????????refresh(hBox_2?plate);
????????hBox_2.setAlignment(Pos.baseLINE_CENTER);
????????Label?label?=?new?Label(“Enter?an?expression:?“);
????????label.setMinHeight(30);
????????TextField?textField?=?new?TextField();
????????textField.setMinHeight(40);
????????textField.setMinWidth(180);
????????textField.setFont(Font.font(12));
????????Button?btn_Verify?=?new?Button(“Verify“);
????????btn_Verify.setMinHeight(40);
????????btn_Verify.setMinWidth(140);
????????hBox_3.getChildren().addAll(label?textField?btn_Verify);
????????hBox_3.setAlignment(Pos.baseLINE_CENTER);
????????stage.settitle(“24-Point?Card?Game“);
????????stage.setScene(new?Scene(root470280));
????????vBox.layoutXProperty().bind(stage.getScene().widthProperty().divide(2).subtract(235));
????????vBox.layoutYProperty().bind(stage.getScene().heightProperty().divide(2).subtract(140));
????????vBox.setPadding(new?Insets(5555));
????????stage.show();
????????//綁定事件
????????btn_Refresh.setOnAction(event?->?{
????????????refresh(hBox_2?plate);
????????});
????????btn_Verify.setOnAction(event?->?{
????????????verify_result(verify(textField.getText().replaceAll(“?“““)));//驗證并彈出驗證結果窗口
????????});
????}
????//更新圖片
????public?void?refresh(HBox?hBox?int[][]?plate)?{
????????setPlate();
????????setImage(hBox?plate);
????}
????//①隨機獲取4張卡牌
????public?void?setPlate()?{
????????String[]?str?
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2019-01-02?10:56??24點游戲\
?????目錄???????????0??2019-12-26?17:36??24點游戲\.idea\
?????目錄???????????0??2019-02-20?20:05??24點游戲\.idea\artifacts\
?????文件?????????734??2018-12-17?14:35??24點游戲\.idea\compiler.xm
?????文件?????????189??2018-12-17?14:35??24點游戲\.idea\desc
?????文件?????????201??2018-12-21?18:52??24點游戲\.idea\encodings.xm
?????文件?????????142??2019-12-26?17:27??24點游戲\.idea\gradle.xm
?????文件?????????396??2019-12-26?17:27??24點游戲\.idea\misc.xm
?????文件?????????295??2018-12-17?14:36??24點游戲\.idea\modules.xm
?????文件????????8919??2018-12-17?14:35??24點游戲\.idea\uiDesigner.xm
?????文件?????????173??2018-12-17?14:35??24點游戲\.idea\vcs.xm
?????文件???????18513??2019-12-26?17:36??24點游戲\.idea\workspace.xm
?????目錄???????????0??2019-01-02?10:56??24點游戲\img\
?????文件????????2426??2018-12-17?19:48??24點游戲\img\0.png
?????文件????????4141??2018-01-16?16:40??24點游戲\img\1-1.png
?????文件????????7014??2018-01-16?16:33??24點游戲\img\1-10.png
?????文件???????10412??2018-01-16?16:33??24點游戲\img\1-11.png
?????文件???????10976??2018-01-16?16:40??24點游戲\img\1-12.png
?????文件???????10507??2018-01-16?16:40??24點游戲\img\1-13.png
?????文件????????3664??2018-01-16?16:58??24點游戲\img\1-2.png
?????文件????????4068??2018-01-16?16:32??24點游戲\img\1-3.png
?????文件????????4574??2018-01-16?16:32??24點游戲\img\1-4.png
?????文件????????5153??2018-01-16?16:32??24點游戲\img\1-5.png
?????文件????????5295??2018-01-16?16:32??24點游戲\img\1-6.png
?????文件????????5745??2018-01-16?16:32??24點游戲\img\1-7.png
?????文件????????6463??2018-01-16?16:32??24點游戲\img\1-8.png
?????文件????????6430??2018-01-16?16:33??24點游戲\img\1-9.png
?????文件????????5221??2018-01-16?16:31??24點游戲\img\2-1.png
?????文件????????9084??2018-01-16?16:30??24點游戲\img\2-10.png
?????文件???????11401??2018-01-16?16:30??24點游戲\img\2-11.png
?????文件???????11189??2018-01-16?16:31??24點游戲\img\2-12.png
............此處省略80個文件信息
評論
共有 條評論