diff --git a/src/view/ExamView.java b/src/view/ExamView.java index a9019bb..2962c13 100644 --- a/src/view/ExamView.java +++ b/src/view/ExamView.java @@ -1,7 +1,7 @@ package view; import controller.NavigationController; -import controller.NavigationService; // 新增导入 +import controller.NavigationService; import controller.QuestionController; import model.Question; @@ -25,7 +25,7 @@ import java.awt.event.ItemListener; public class ExamView extends JFrame { private QuestionController questionController; - private NavigationService navigationService; // 新增 + private NavigationService navigationService; private JLabel questionLabel; private JLabel progressLabel; private ButtonGroup optionGroup; @@ -37,7 +37,7 @@ public class ExamView extends JFrame { public ExamView() { questionController = new QuestionController(); - navigationService = NavigationController.getInstance(); // 新增 + navigationService = NavigationController.getInstance(); initializeUI(); } diff --git a/src/view/MainView.java b/src/view/MainView.java index 969fbf7..77fc4ba 100644 --- a/src/view/MainView.java +++ b/src/view/MainView.java @@ -1,7 +1,7 @@ package view; import controller.NavigationController; -import controller.NavigationService; // 新增导入 +import controller.NavigationService; import controller.UserController; import model.User; @@ -24,11 +24,11 @@ public class MainView extends JFrame { private JComboBox difficultyComboBox; private JTextField countField; private User currentUser; // 保存当前登录用户 - private NavigationService navigationService; // 新增 + private NavigationService navigationService; public MainView(User user) { this.currentUser = user; - this.navigationService = NavigationController.getInstance(); // 新增 + this.navigationService = NavigationController.getInstance(); initializeUI(); } @@ -73,7 +73,7 @@ public class MainView extends JFrame { mainPanel.add(formPanel, BorderLayout.CENTER); - // Button panel - 添加修改密码按钮 + JPanel buttonPanel = new JPanel(new FlowLayout()); JButton changePasswordButton = new JButton("修改密码"); JButton logoutButton = new JButton("退出登录"); diff --git a/src/view/RegisterView.java b/src/view/RegisterView.java index 49d2b72..14c8ec2 100644 --- a/src/view/RegisterView.java +++ b/src/view/RegisterView.java @@ -1,7 +1,7 @@ package view; import controller.NavigationController; -import controller.NavigationService; // 新增导入 +import controller.NavigationService; import controller.UserController; import model.User; @@ -21,7 +21,7 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; public class RegisterView extends JFrame { - private JTextField usernameField; // 新增:用户名输入框 + private JTextField usernameField; // 用户名输入框 private JTextField emailField; private JTextField codeField; private JPasswordField passwordField; @@ -39,7 +39,7 @@ public class RegisterView extends JFrame { private void initializeUI() { setTitle("数学学习软件 - 注册"); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - setSize(550, 500); // 增加高度以容纳用户名字段 + setSize(550, 500); setLocationRelativeTo(null); setResizable(false); diff --git a/src/view/ResultView.java b/src/view/ResultView.java index 907ed3f..c1b4393 100644 --- a/src/view/ResultView.java +++ b/src/view/ResultView.java @@ -1,7 +1,7 @@ package view; import controller.NavigationController; -import controller.NavigationService; // 新增导入 +import controller.NavigationService; import javax.swing.JFrame; import javax.swing.JPanel; @@ -18,7 +18,7 @@ import java.awt.event.ActionListener; public class ResultView extends JFrame { private JLabel scoreLabel; private JLabel percentageLabel; - private NavigationService navigationService; // 新增 + private NavigationService navigationService; public ResultView() { navigationService = NavigationController.getInstance(); // 新增