java的总结

由于最近已经开始做项目了,所以对java的基础知识的学习都是一个离散化的状态没有一个很系统的学习,都是哪里不会就去学哪里。

先来讲一下前后端的区别吧

在我的理解前端就是:客户端在前端进行点击输入数据,前端将这些数据整合起来然后通过集合,或者对象使用序列化的操作进行,将这个数据发给服务器。服务器会根据你发过来的操作信息进行增删改查将数据处理,然后返回给前端,前端就会根据从服务器返回的数据进行假面的转化。

后端:其实就是前面所讲的服务器的建设其实就是后端的工作,我们可以使用jdbc加上mysql语言来对数据库进行增删改查。这个就是后端的工作,我感觉后端前端都很难。

主要就是实现了通过网络编程实现了学生的登录和注册

在这里我封装了几个比较好的类(返回按钮)

java 复制代码
package tool;

import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
import org.example.demo1.ChooseteacherApplicant;

import java.io.IOException;

public class Back {
    @FXML
    public Button backbutton;

    public String str;

    public Back(Button backbutton,String str){
        this.backbutton = backbutton;
        this.str = str;
    }

    public Back backfunction() throws IOException {
        Stage oldStage = (Stage) backbutton.getScene().getWindow();
        oldStage.close();
        FXMLLoader fxmlLoader = new FXMLLoader(ChooseteacherApplicant.class.getResource(str));
        Scene scene = null;
        try {
            scene = new Scene(fxmlLoader.load(), 620, 400);
        } catch (IOException e) {
            System.out.println("我自己封装的bcak按钮出问题了");
        }
        Stage stage=new Stage();
        stage.initStyle(StageStyle.UNDECORATED);
        stage.setTitle("Hello!");
        stage.setScene(scene);
        stage.show();
        return null;
    }

}

还有一个界面跳转的类(界面跳转)

java 复制代码
package tool;

import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
import org.example.demo1.ChooseteacherApplicant;
import org.example.demo1.HelloApplication;
import org.example.demo1.StudentRegisterApplicant;

import java.io.IOException;
public class Jumping {
    @FXML
    public Button jumpbutton;

    public String str;

    public Jumping(Button jumpbutton ,String str){
        this.jumpbutton = jumpbutton;
        this.str = str;
    }

    public void jumpfunction() throws IOException {
        Stage oldStage = (Stage) jumpbutton.getScene().getWindow();
        oldStage.close();

        FXMLLoader fxmlLoader = new FXMLLoader(HelloApplication.class.getResource(str));
        Scene scene = new Scene(fxmlLoader.load(), 620, 400);
        Stage stage=new Stage();
        stage.initStyle(StageStyle.UNDECORATED);
        stage.setTitle("Hello!");
        stage.setScene(scene);
        stage.show();
    }
}
相关推荐
Otaku love travel37 分钟前
老系统改造增加初始化,自动化数据源配置(tomcat+jsp+springmvc)
java·tomcat·初始化·动态数据源
DKPT1 小时前
Java设计模式之行为型模式(责任链模式)介绍与说明
java·笔记·学习·观察者模式·设计模式
L_autinue_Star1 小时前
手写vector容器:C++模板实战指南(从0到1掌握泛型编程)
java·c语言·开发语言·c++·学习·stl
晨岳1 小时前
CentOS 安装 JDK+ NGINX+ Tomcat + Redis + MySQL搭建项目环境
java·redis·mysql·nginx·centos·tomcat
执笔诉情殇〆1 小时前
前后端分离(java) 和 Nginx在服务器上的完整部署方案(redis、minio)
java·服务器·redis·nginx·minio
元气小嘉1 小时前
前端技术小结
开发语言·前端·javascript·vue.js·人工智能
YuTaoShao1 小时前
【LeetCode 热题 100】24. 两两交换链表中的节点——(解法一)迭代+哨兵
java·算法·leetcode·链表
励志的大鹰哥2 小时前
V少JS基础班之第七弹
开发语言·javascript·ecmascript
程序员的世界你不懂2 小时前
(20)Java+Playwright自动化测试- 操作鼠标拖拽 - 上篇
java·python·计算机外设
AI360labs_atyun2 小时前
Java在AI时代的演进与应用:一个务实的视角
java·开发语言·人工智能·科技·学习·ai