第二次进制转换

main
叶锋 1 month ago
parent fc82a1ec5c
commit e8b8213d4f

@ -1,4 +1,6 @@
import javafx.application.Application;
import javafx.stage.Stage;
import javafx.application.Application;
import javafx.geometry.Insets;
import javafx.scene.Scene;
import javafx.scene.control.*;
@ -27,7 +29,7 @@ public class test1 extends Application {
Label fromBaseLabel = new Label("源进制:");
GridPane.setConstraints(fromBaseLabel, 0, 1);
ComboBox<Integer> fromBaseCombo = new ComboBox<>();
fromBaseCombo.getItems().addAll(2, 10, 16);
fromBaseCombo.getItems().addAll(2, 8, 10, 16); // 添加八进制
fromBaseCombo.setValue(10); // 默认选择十进制
GridPane.setConstraints(fromBaseCombo, 1, 1);
@ -35,7 +37,7 @@ public class test1 extends Application {
Label toBaseLabel = new Label("目标进制:");
GridPane.setConstraints(toBaseLabel, 0, 2);
ComboBox<Integer> toBaseCombo = new ComboBox<>();
toBaseCombo.getItems().addAll(2, 10, 16);
toBaseCombo.getItems().addAll(2, 8, 10, 16); // 添加八进制
toBaseCombo.setValue(10); // 默认选择十进制
GridPane.setConstraints(toBaseCombo, 1, 2);

Loading…
Cancel
Save