首页下载资源后端JavaFX + MySql 实现学生信息管理系统

ZIPJavaFX + MySql 实现学生信息管理系统

Wksycxy1.45MB需要积分:1

资源文件列表:

System 大约有49个文件
  1. System/.idea/
  2. System/.idea/.gitignore 184B
  3. System/.idea/artifacts/
  4. System/.idea/compiler.xml 734B
  5. System/.idea/dataSources.local.xml 974B
  6. System/.idea/dataSources.xml 578B
  7. System/.idea/dataSources/
  8. System/.idea/dataSources/5574324a-1ddb-47ad-b55a-966ad90fd972.xml 34.03KB
  9. System/.idea/dataSources/5574324a-1ddb-47ad-b55a-966ad90fd972/
  10. System/.idea/dataSources/5574324a-1ddb-47ad-b55a-966ad90fd972/storage_v2/
  11. System/.idea/dataSources/5574324a-1ddb-47ad-b55a-966ad90fd972/storage_v2/_src_/
  12. System/.idea/dataSources/5574324a-1ddb-47ad-b55a-966ad90fd972/storage_v2/_src_/schema/
  13. System/.idea/dataSources/5574324a-1ddb-47ad-b55a-966ad90fd972/storage_v2/_src_/schema/information_schema.FNRwLQ.meta 76B
  14. System/.idea/description.html 189B
  15. System/.idea/encodings.xml 164B
  16. System/.idea/gradle.xml 142B
  17. System/.idea/libraries/
  18. System/.idea/libraries/javafx_swt.xml 627B
  19. System/.idea/misc.xml 409B
  20. System/.idea/modules.xml 259B
  21. System/.idea/uiDesigner.xml 8.71KB
  22. System/.idea/vcs.xml 173B
  23. System/.idea/workspace.xml 17.79KB
  24. System/image/
  25. System/image/bg.jpg 340.49KB
  26. System/image/bg1.jpg 70.99KB
  27. System/JavaFX.iml 760B
  28. System/lib/
  29. System/lib/mysql-connector-java-5.1.48.jar 983.36KB
  30. System/out/
  31. System/out/production/
  32. System/out/production/JavaFX/
  33. System/out/production/JavaFX/META-INF/
  34. System/out/production/JavaFX/META-INF/JavaFX.kotlin_module 16B
  35. System/out/production/JavaFX/sample/
  36. System/out/production/JavaFX/sample/Connect.class 10.58KB
  37. System/out/production/JavaFX/sample/Main.class 413B
  38. System/out/production/JavaFX/sample/Student.class 3.08KB
  39. System/out/production/JavaFX/sample/View$1.class 1.52KB
  40. System/out/production/JavaFX/sample/View$2.class 1.52KB
  41. System/out/production/JavaFX/sample/View.class 33.29KB
  42. System/src/
  43. System/src/sample/
  44. System/src/sample/Connect.java 13.47KB
  45. System/src/sample/Main.java 126B
  46. System/src/sample/Student.java 2.56KB
  47. System/src/sample/View.java 39.2KB
  48. System/系统结构图.xmind 50.83KB
  49. System/学生信息管理系统ER图.png 70.53KB

资源介绍:

详情请看
package sample; import javafx.application.Application; import javafx.beans.value.ChangeListener; import javafx.beans.value.ObservableValue; import javafx.geometry.Insets; import javafx.geometry.Pos; import javafx.scene.Scene; import javafx.scene.control.*; import javafx.scene.control.cell.PropertyValueFactory; import javafx.scene.image.Image; import javafx.scene.layout.*; import javafx.scene.paint.Color; import javafx.scene.text.Font; import javafx.scene.text.FontPosture; import javafx.scene.text.FontWeight; import javafx.stage.Stage; import javafx.util.Callback; import java.util.ArrayList; public class View extends Application { // 登录学生学号 private static int id; private static Stage stage; // 提示框数目 private static int number = 0; // 增删改查的页面数 private static int anum = 0; private static Student student0; private static Image img=new Image("D:\\JAVA\\id\\JavaFX\\image\\bg1.jpg"); private static BackgroundImage bImg = new BackgroundImage(img, BackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT, BackgroundPosition.DEFAULT, BackgroundSize.DEFAULT); private static Background bGround = new Background(bImg); @Override public void start(Stage stage) throws Exception { // 将舞台复制给静态属性 View.stage = stage; stage.setTitle("学生信息管理系统"); // 设置窗口大小不可调节 stage.setResizable(false); // 登录 login(); stage.show(); } // 登录界面 static void login() { // 新建布局 GridPane gp = new GridPane(); // 设置居中方式 gp.setAlignment(Pos.CENTER); // 调整空隙 gp.setHgap(10); gp.setVgap(20); // 新建文本标签 Label l1 = new Label("学号"); TextField idt = new TextField(); // 用户密码 Label l2 = new Label("密码"); // 字体 Font fon1 = Font.font("Times New Roman", FontWeight.BOLD, FontPosture.REGULAR, 20); l1.setFont(fon1); l2.setFont(fon1); // 新建密码框 PasswordField pwd = new PasswordField(); // 按钮的创建 Button b1 = new Button("登录"); Button b2 = new Button("注册"); // 单选框:学生,老师 ToggleGroup group = new ToggleGroup(); RadioButton student = new RadioButton("学生"); RadioButton manager = new RadioButton("管理员"); HBox h1 = new HBox(); student.setToggleGroup(group); manager.setToggleGroup(group); // 添加单选按钮监听 group.selectedToggleProperty().addListener((observable, oldValue, newValue) -> { if (newValue.equals(student)) { //单选按钮为学生 l1.setText("学号"); b1.setOnAction(actionEvent -> { try { if (Connect.login(Integer.valueOf(idt.getText()), pwd.getText()) > 0) { id=Integer.valueOf(idt.getText()); homepage(); } else { if (number == 0) { tips("登陆失败"); } } } catch (Exception e) { e.printStackTrace(); } }); // 注册按钮事件 b2.setOnAction(actionEvent -> { BorderPane bp = new BorderPane(); add(bp); }); // 设置”注册“按钮可见 b2.setVisible(true); } else if (newValue.equals(manager)) { // 设置”注册“按钮不可见 b2.setVisible(false); l1.setText("姓名"); b1.setOnAction(actionEvent -> { try { if (Connect.maglogin(idt.getText(), pwd.getText())) { maghomepage(); } else { if (number == 0) { tips("登录失败"); } } ; } catch (Exception e) { e.printStackTrace(); } }); } }); h1.getChildren().addAll(student, manager); // 背景图片 gp.setBackground(bGround); // 添加画板 gp.add(l1, 0, 0); gp.add(idt, 1, 0); gp.add(l2, 0, 1); gp.add(pwd, 1, 1); gp.add(b1, 0, 2); gp.add(b2, 1, 2); gp.add(h1, 1, 3); Scene sc = new Scene(gp, 400, 300); stage.setScene(sc); } // 学生操作界面 static void homepage() { // 创建文本 Label l5 = new Label("学生查询系统"); Button l1 = new Button("个人信息"); Button l3 = new Button("成绩查询"); Button l4 = new Button("返回登录"); // 设置字体颜色 l1.setTextFill(Color.BLUE); l3.setTextFill(Color.BLUE); l4.setTextFill(Color.BLUE); // 设置字体大小 Font fon1 = Font.font("Times New Roman", FontWeight.BOLD, FontPosture.REGULAR, 30); Font fon2 = Font.font("Times New Roman", FontWeight.BOLD, FontPosture.REGULAR, 20); l5.setFont(fon1); l1.setFont(fon2); l3.setFont(fon2); l4.setFont(fon2); // 学生信息查询 l1.setOnAction(actionEvent -> { query(); }); // 成绩查询 l3.setOnAction(actionEvent -> { try { score(id); } catch (Exception e) { e.printStackTrace(); } }); // 返回登陆 l4.setOnAction(actionEvent -> { login(); }); // 添加面板 VBox bv = new VBox(50, l5, l1, l3, l4); bv.setAlignment(Pos.CENTER); bv.setBackground(bGround); Scene sc = new Scene(bv, 500, 600); stage.setScene(sc); } // 管理员操作界面 static void maghomepage() { // 创建文本 Label l5 = new Label("学生查询系统"); Button l1 = new Button("学生信息管理"); Button l2 = new Button("学生成绩管理"); Button l3 = new Button("返回登陆"); // 设置字体颜色 l1.setTextFill(Color.BLUE); l2.setTextFill(Color.BLUE); l3.setTextFill(Color.BLUE); // 设置字体大小 Font fon1 = Font.font("Times New Roman", FontWeight.BOLD, FontPosture.REGULAR, 30); Font fon2 = Font.font("Times New Roman", FontWeight.BOLD, FontPosture.REGULAR, 20); l5.setFont(fon1); l1.setFont(fon2); l2.setFont(fon2); l3.setFont(fon2); // 学生信息管理 l1.setOnAction(actionEvent -> { magquery(); }); // 学生成绩管理 l2.setOnAction(actionEvent -> { magscore(); }); // 返回登陆 l3.setOnAction(actionEvent -> { login(); }); // 添加面板 VBox bv = new VBox(50, l5, l1, l2, l3); bv.setAlignment(Pos.CENTER); bv.setBackground(bGround); Scene sc = new Scene(bv, 500, 600); stage.setScene(sc); } // 学生信息查询界面 static void query() { BorderPane bp = new BorderPane(); // 顶部 FlowPane fp1 = new Flo
100+评论
captcha