diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 6eb2a49..ea8c818 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -9,10 +9,9 @@
-
-
+
-
+
@@ -47,10 +46,10 @@
-
-
+ {}
+ {
+ "isMigrated": true
+}
{
"customColor": "",
"associatedIndex": 1
@@ -61,25 +60,25 @@
- {
+ "keyToString": {
+ "RunOnceActivity.ShowReadmeOnStart": "true",
+ "SHARE_PROJECT_CONFIGURATION_FILES": "true",
+ "git-widget-placeholder": "liwentao__branch",
+ "kotlin-language-version-configured": "true",
+ "node.js.detected.package.eslint": "true",
+ "node.js.detected.package.tslint": "true",
+ "node.js.selected.package.eslint": "(autodetect)",
+ "node.js.selected.package.tslint": "(autodetect)",
+ "nodejs_package_manager_path": "npm",
+ "onboarding.tips.debug.path": "C:/Users/Teptao/Desktop/软件工程导论/结对项目/TestSystem/src/main/java/org/example/Main.java",
+ "project.structure.last.edited": "工件",
+ "project.structure.proportion": "0.15",
+ "project.structure.side.proportion": "0.2",
+ "vue.rearranger.settings.migration": "true",
+ "应用程序.MathApp.executor": "Run"
}
-}]]>
+}
@@ -99,6 +98,7 @@
+
@@ -160,7 +160,23 @@
1760136867337
-
+
+
+ 1760182983400
+
+
+
+ 1760182983400
+
+
+
+ 1760183246928
+
+
+
+ 1760183246928
+
+
@@ -193,6 +209,8 @@
-
+
+
+
\ No newline at end of file
diff --git a/src/main/java/com/mathapp/panels/MainMenuPanel.java b/src/main/java/com/mathapp/panels/MainMenuPanel.java
index 3afece3..68ffc43 100644
--- a/src/main/java/com/mathapp/panels/MainMenuPanel.java
+++ b/src/main/java/com/mathapp/panels/MainMenuPanel.java
@@ -86,6 +86,15 @@ public class MainMenuPanel extends JPanel {
}
private void handleStart() {
+
+ ButtonModel selectedModel = levelGroup.getSelection();
+
+ // 关键检查:判断是否有按钮被选中
+ if (selectedModel == null) {
+ JOptionPane.showMessageDialog(this, "请先选择一个难度级别!", "选择错误", JOptionPane.WARNING_MESSAGE);
+ return; // 发现未选择后,直接退出方法,不执行后续逻辑
+ }
+
String level = levelGroup.getSelection().getActionCommand();
int count;
try {
diff --git a/target/classes/com/mathapp/panels/MainMenuPanel.class b/target/classes/com/mathapp/panels/MainMenuPanel.class
index a7ada08..2992fe9 100644
Binary files a/target/classes/com/mathapp/panels/MainMenuPanel.class and b/target/classes/com/mathapp/panels/MainMenuPanel.class differ
diff --git a/target/classes/com/mathapp/problemGenerators/HighSchoolProblemGenerator.class b/target/classes/com/mathapp/problemGenerators/HighSchoolProblemGenerator.class
index e982df6..a8f572c 100644
Binary files a/target/classes/com/mathapp/problemGenerators/HighSchoolProblemGenerator.class and b/target/classes/com/mathapp/problemGenerators/HighSchoolProblemGenerator.class differ