javafx自定义日历组件

javaFX带时分秒的日期选择器 最近做个项目,时间需要选择到秒,但是FX自带的DatePicker组件不好用,所以自己自定义了一个带时分秒的日期选择器,不需要额外FXML和CSS,简洁好用。 第一部分是年月选择,通过左右按钮前移后移年份和月份,选择时日期部分也随之更新。 第二部分是日期选择,默认进入界面后是当前月份,从星期一开始,和我们Windos系统自带的时间版面一样。如果当月第一天不是周一,则使用上月最后几天填补当月第一天前面的日期,如果当月最后一天不是周日,则使用下月最初几天填补当月最后一天后面的日期,上月和下月日期不可选择。如 阅读详情

博客来由:

个人觉得javafx原生日历工具太不美观了,然后自己写了一个通用可配置的日历组件DatePicker,大家若是觉得好看就拿去用吧,记得点个赞哦!

技术分享交流 qq群(835259695)

注:以下都是本组件的可配置效果图

年月日时分秒-日历效果图如下:
在这里插入图片描述
年月日-日历效果图如下:
在这里插入图片描述
年月日时分秒-日历效果图如下:
在这里插入图片描述
1.java代码如下(其中用到了一个窗口拖动工具类)

package com.xzl.utils;

import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.ComboBox;
import javafx.scene.control.Label;
import javafx.scene.control.TextField;
import javafx.scene.layout.*;
import javafx.scene.paint.Color;
import javafx.stage.Modality;
import javafx.stage.Stage;
import javafx.stage.StageStyle;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
/**
 * 通用日历组件
 * @author 徐志林
 * @createTime 2020-04-21 23:18
 */
public class DatePicker {
    Calendar c = Calendar.getInstance();
    int year = c.get(Calendar.YEAR);
    int month = c.get(Calendar.MONTH)+1;
    int date = c.get(Calendar.DATE);
    int hour = c.get(Calendar.HOUR_OF_DAY);
    int minute = c.get(Calendar.MINUTE);
    int second = c.get(Calendar.SECOND);
    Stage stage;
    HBox timeCombobox;
    ComboBox hourCombobox;
    ComboBox minuteCombobox;
    ComboBox secondCombobox;
    Boolean isFirstComing;
    //日期选择
    HBox datePick;

    Label yearLabel;
    Label monthLabel;
    public TextField timeField;
    public Boolean withSecond;
    //日期控件是否需要强行转换为  如果circleType为false则:控件一定为矩形 ,为true时还要进行withSecond判断
    public Boolean circleType;
    double x,y;

    /**
     * @param withSecond 是否带时分秒  true有 false无
     * @param isCircleType 是否为圆形框,亦或方形框
     */
    public DatePicker(Boolean withSecond, Boolean isCircleType){
        this.withSecond = withSecond;
        this.circleType = isCircleType;
        isFirstComing = true;
        timeField = new TextField();
        datePick = new HBox();
        yearLabel = new Label(timeFilter(year));
        monthLabel = new Label(timeFilter(month));
    }

    /**
     * 初始化当前日期时间
     */
    public void setCalendarTime(){
        Calendar calendar = Calendar.getInstance();//可以对每个时间域单独修改
        year = calendar.get(Calendar.YEAR);
        month = calendar.get(Calendar.MONTH)+1;
        date = calendar.get(Calendar.DATE);
        hour = calendar.get(Calendar.HOUR_OF_DAY);
        minute = calendar.get(Calendar.MINUTE);
        second = calendar.get(Calendar.SECOND);
    }

    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    SimpleDateFormat sdfSecond = new SimpleDateFormat("yyyy-MM-dd");
    public void showDatePicker() {
        String timeValStr = timeField.getText();
        String timeVal = timeValStr==null?"":timeValStr.trim();
        //初始化当前日期时间
        if(timeField!=null && timeVal.length()>0){
            try {
                Date dateTime;
                if(withSecond){
                    dateTime = sdf.parse(timeVal);
                }else {
                    dateTime = sdfSecond.parse(timeVal);
                }
                c.setTime(dateTime);
            } catch (ParseException e) {
                e.printStackTrace();
            }
        }else{
            setCalendarTime();
        }
        stage = new Stage();
        //以下两个同时设置可
        stage.initModality(Modality.APPLICATION_MODAL);//设置弹框为APPLICATION_MODAL模式
        stage.initStyle(StageStyle.TRANSPARENT);//隐藏默认标题栏
        try {
            BorderPane root = new BorderPane();
            root.setStyle("-fx-border-radius: 4;");
            //主舞台
            VBox layout = new VBox();
            layout.setAlignment(Pos.CENTER);
            layout.setId("layout");
            layout.getChildren().add(root);
            VBox layoutMain = new VBox(10);
            layoutMain.setStyle("-fx-background-color:transparent;");
            layoutMain.getChildren().addAll(layout);
            layoutMain.setAlignment(Pos.CENTER);
            layout.maxHeightProperty().bind(layoutMain.heightProperty().subtract(15));
            layout.minHeightProperty().bind(layoutMain.heightProperty().subtract(15));
            layout.minWidthProperty().bind(layoutMain.widthProperty().subtract(15));
            layout.maxWidthProperty().bind(layoutMain.widthProperty().subtract(15));
            root.minHeightProperty().bind(layout.heightProperty());
            root.maxWidthProperty().bind(layout.widthProperty());
            root.minHeightProperty().bind(layout.heightProperty());
            root.maxWidthProperty().bind(layout.widthProperty());
            Scene scene = new Scene(layoutMain, 365, 505-(withSecond?0:110));
            scene.getStylesheets().add("/css/datePicker.css");

            //日期(年月日)主体
            VBox upMain = new VBox();
            upMain.setStyle("-fx-min-height: 330;-fx-max-height: 330;-fx-min-width:350;-fx-max-width:350;-fx-alignment: center;");
            setUpMain(upMain);
            root.setTop(upMain);

            if(withSecond){
                //时间(时分秒)主体
                VBox downMain = new VBox();
                setDownMain(downMain);
                root.setCenter(downMain);
            }

            //确认按钮
            VBox confirmBox = new VBox();
            setBtnBox(confirmBox);
            root.setBottom(confirmBox);


            //设置默认时间
            setCurrentDateTime();

            scene.setFill(Color.rgb(255,255,255,0.01));
            stage.setScene(scene);
            stage.setX(x+(withSecond?15:25));
            stage.setY(y-(withSecond?10:15));
            stage.showAndWait();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private void setUpMain(VBox upMain){
        //时间box
        HBox timeLabelBox = new HBox();
        timeLabelBox.setStyle("-fx-min-height: 40;-fx-max-height: 40;-fx-min-width:350;-fx-alignment: CENTER_LEFT;-fx-padding: 10; ");
        timeLabelBox.getChildren().add(new Label("日期"));
        //日期头部拖动
        DragUtil.addDragListener(stage, timeLabelBox);

        HBox main = new HBox();
        main.setStyle("-fx-min-height: 290;-fx-max-height: 290;-fx-min-width:350;-fx-max-width:350;-fx-alignment: CENTER;");
        VBox innerMainBox = new VBox();
        innerMainBox.setStyle("-fx-min-height: 290;-fx-max-height: 290;-fx-min-width:335;-fx-max-width:335;-fx-alignment: CENTER;");
        //年月选择
        HBox yearMonthBox = new HBox();
        yearMonthBox.setId("yearMonthBox");
        yearMonthBox.setStyle("-fx-min-height: 35;-fx-max-height: 35;-fx-min-width:310;-fx-max-width:310;-fx-alignment: CENTER; ");
        setYearMonthContent(yearMonthBox);
        //星期
        HBox weekBox = new HBox();
        weekBox.setStyle("-fx-min-height: 35;-fx-max-height: 35;-fx-min-width:335;-fx-max-width:335;-fx-alignment: CENTER;");
        setWeekContent(weekBox);
        //留白5px
        HBox whiteBox = new HBox();
        whiteBox.setStyle("-fx-min-height: 5;-fx-max-height: 5;");
        //日期选择
        datePick.setId("datePick");
        datePick.setStyle("-fx-min-height: 225;-fx-max-height: 225;-fx-min-width:310;-fx-max-width:310;");

        setDatePickContent();

        innerMainBox.getChildren().addAll(yearMonthBox,weekBox,whiteBox,datePick);
        main.getChildren().add(innerMainBox);
        upMain.getChildren().addAll(timeLabelBox,main);
    }

    public void setDownMain(VBox downMain){
        downMain.setStyle("-fx-min-height: 150;-fx-max-height: 150;-fx-min-width:350;-fx-max-width:350;-fx-alignment: center;");

        HBox emptyBox1 = new HBox();
        emptyBox1.setStyle("-fx-min-height: 5;-fx-max-height: 5;-fx-min-width:330;-fx-max-width:330;-fx-border-style:  hidden hidden solid hidden;-fx-border-color:#EBEBEB; ");
        //时间box
        HBox timeLabelBox = new HBox();
        timeLabelBox.setStyle("-fx-min-height: 40;-fx-max-height: 40;-fx-min-width:350;-fx-alignment: CENTER_LEFT;-fx-padding: 10; ");
        timeLabelBox.getChildren().add(new Label("时间"));
        //时间选择combobox
        timeCombobox = new HBox();
        timeCombobox.setStyle("-fx-min-height: 30;-fx-max-height: 30;-fx-min-width:350;-fx-alignment: center;");
        setComboBoxs();
        HBox emptyBox2 = new HBox();
        emptyBox2.setStyle("-fx-min-height: 35;-fx-max-height: 35;-fx-min-width:350;");
        downMain.getChildren().addAll(emptyBox1,timeLabelBox,timeCombobox,emptyBox2);
    }

    public void setBtnBox(VBox box){
        //取消和确认按钮box
        HBox btnBox = new HBox();
        btnBox.setStyle("-fx-min-height: 40;-fx-max-height: 40;-fx-min-width:350;-fx-border-style: solid hidden hidden hidden;-fx-border-color:#EBEBEB;-fx-alignment: center;");
        setBtns(btnBox);
        box.getChildren().add(btnBox);
    }

    final String HOVERED_BUTTON_STYLE = "-fx-text-fill: white;-fx-background-color: #5b8cff;";
    final String NORMAL_BUTTON_STYLE = "-fx-text-fill: black;-fx-background-color: transparent;";
    private void setDatePickContent(){
        FlowPane flow = new FlowPane();
        flow.setVgap(2);
        flow.setHgap(10);
        flow.setPrefWrapLength(310);
        List<Button> btnList = new ArrayList<>();
        //当月总天数
        int monthDays = getDaysOfMonth(month);
        //前一个月总天数
        int lastMonthDays = getDaysOfMonth(month-1);

        //判断当月第一天是星期几, curDay为多少则前一个月所在当前的天数就为多少
        int curDay = getWeekNumber(1);
        //getWeekNumber(monthDays)最后一天是星期几
        // 6-getWeekNumber(monthDays) 就为下个月有几天在当前日历
        int lastDay = 6-getWeekNumber(monthDays);

        List<Integer> allDayList = new ArrayList<>();

        for(int i=(curDay-1);i>-1;i--){
            //加入上个月在本日历的几天
            allDayList.add(lastMonthDays-i);
        }
        for(int i=1;i<=monthDays;i++){
            //加入本月的日历
            allDayList.add(i);
        }
        for(int i=1;i<=lastDay;i++){
            //加入下个月的几天
            allDayList.add(i);
        }

        int size = allDayList.size();
        int subDate = (size-lastDay-1);
        c.setTime(new Date());
        int realYear = c.get(Calendar.YEAR);
        int realMonth = c.get(Calendar.MONTH)+1;
        for (int i = 0; i < size; i++) {
            int k = allDayList.get(i);
            Button btn = new Button(String.valueOf(k));
            if(year==realYear && month==realMonth && k==date)
                btn.setStyle(HOVERED_BUTTON_STYLE);
            if(i>=curDay && i<= subDate){
                btn.setOnMouseEntered(e -> btn.setStyle(HOVERED_BUTTON_STYLE));
                btn.setOnMouseExited(e -> btn.setStyle(NORMAL_BUTTON_STYLE));
                btnList.add(btn);
                btn.setOnAction(oa->{
                    for(Button b:btnList){
                        b.setStyle(NORMAL_BUTTON_STYLE);
                    }
                    btn.setOnMouseEntered(null);
                    btn.setOnMouseExited(null);
                    btn.setStyle(HOVERED_BUTTON_STYLE);
                    date = k;
                    //设置当前选择日期的时间
                    setCurrentDateTime();
                    System.out.println("点击了日期:"+date);
                });
            }else{
                btn.setDisable(true);
                btn.setStyle("-fx-background-color: #F4F4F4;");
            }
            flow.getChildren().add(btn);
        }
        datePick.getChildren().clear();
        datePick.getChildren().add(flow);
    }

    private void setYearMonthContent(HBox yearMonthBox){
        HBox yearLeft = new HBox();
        yearLeft.setStyle("-fx-min-height: 35;-fx-max-height: 35;-fx-min-width:30;-fx-max-width:30;-fx-alignment: CENTER_RIGHT;");
        Button bt1 = new Button();
        bt1.setStyle("-fx-background-image: url('/image/yearLeftArrow.png');-fx-background-size:50%;-fx-background-position:center;-fx-background-repeat:no-repeat;-fx-background-color: transparent;");
        yearLeft.getChildren().add(bt1);

        HBox yearRight = new HBox();
        yearRight.setStyle("-fx-min-height: 35;-fx-max-height: 35;-fx-min-width:30;-fx-max-width:30;-fx-alignment: CENTER_LEFT;");
        Button bt2 = new Button();
        bt2.setStyle("-fx-background-image: url('/image/yearRightArrow.png');-fx-background-size:50%;-fx-background-position:center;-fx-background-repeat:no-repeat;-fx-background-color: transparent;");
        yearRight.getChildren().add(bt2);

        HBox monthLeft = new HBox();
        monthLeft.setStyle("-fx-min-height: 35;-fx-max-height: 35;-fx-min-width:65;-fx-max-width:65;-fx-alignment: CENTER_RIGHT; ");
        Button bt3 = new Button();
        bt3.setStyle("-fx-background-image: url('/image/monthLeftArrow.png');-fx-background-size:80%;-fx-background-position:center;-fx-background-repeat:no-repeat;-fx-background-color: transparent;");
        monthLeft.getChildren().add(bt3);

        HBox monthRight = new HBox();
        monthRight.setStyle("-fx-min-height: 35;-fx-max-height: 35;-fx-min-width:65;-fx-max-width:65;-fx-alignment: CENTER_LEFT;");
        Button bt4 = new Button();
        bt4.setStyle("-fx-background-image: url('/image/monthRightArrow.png');-fx-background-size:80%;-fx-background-position:center;-fx-background-repeat:no-repeat;-fx-background-color: transparent;");
        monthRight.getChildren().add(bt4);

        HBox yearAndMonth = new HBox();
        yearAndMonth.setStyle("-fx-min-height: 35;-fx-max-height: 35;-fx-min-width:120;-fx-max-width:120;-fx-alignment:center; ");
        Label yearTitle = new Label("年");
        Label monthTitle = new Label("月");

        bt1.setOnAction(oa->{
            int val = Integer.valueOf(monthLabel.getText())-1;
            month = getRightMonth(val);
            //月减一
            monthLabel.setText(timeFilter(month));
            setDatePickContent();
        });
        bt2.setOnAction(oa->{
            //月加一
            int val = Integer.valueOf(monthLabel.getText())+1;
            month = getRightMonth(val);
            monthLabel.setText(timeFilter(month));
            setDatePickContent();
        });
        bt3.setOnAction(oa->{
            //年减一
            int val = Integer.valueOf(yearLabel.getText())-1;
            year = val;
            yearLabel.setText(String.valueOf(val));
            setDatePickContent();
        });
        bt4.setOnAction(oa->{
            //年加一
            int val = Integer.valueOf(yearLabel.getText())+1;
            year = val;
            yearLabel.setText(String.valueOf(val));
            setDatePickContent();
        });

        yearAndMonth.getChildren().addAll(yearLabel,yearTitle,monthLabel,monthTitle);

        yearMonthBox.getChildren().addAll(monthLeft,yearLeft,yearAndMonth,yearRight,monthRight);
    }

    private int getRightMonth(int val){
        if(val>12)
            val = 1;
        if(val<1)
            val = 12;
        month = val;
        return val;
    }

    private void setWeekContent(HBox weekBox){
        weekBox.setId("weekBox");
        FlowPane flowPane = new FlowPane();
        flowPane.setStyle("-fx-alignment: center;");
        flowPane.setVgap(20);
        flowPane.setHgap(31);
        flowPane.setPrefWrapLength(335);
        flowPane.getChildren().add(new Label("日"));
        flowPane.getChildren().add(new Label("一"));
        flowPane.getChildren().add(new Label("二"));
        flowPane.getChildren().add(new Label("三"));
        flowPane.getChildren().add(new Label("四"));
        flowPane.getChildren().add(new Label("五"));
        flowPane.getChildren().add(new Label("六"));

        weekBox.getChildren().add(flowPane);
    }

    private void setBtns(HBox btnBox){
        Button confirmBtn = new Button("确认");
        Button cancelBtn = new Button("取消");
        confirmBtn.setId("confirmBtn");
        cancelBtn.setId("cancelBtn");
        confirmBtn.setOnAction(oa->{
            System.out.println("你选择的日期是:"+currentDateTime);
            timeField.setText(currentDateTime);
            stage.close();
        });
        cancelBtn.setOnAction(oa->{
            timeField.clear();
            stage.close();
        });
        btnBox.getChildren().addAll(cancelBtn,confirmBtn);
    }

    private String currentDateTime;
    private void setCurrentDateTime(){
        if(isFirstComing){
            isFirstComing = false;
            currentDateTime = "";
            currentDateTime = year +"-"+ timeFilter(month)+"-"+timeFilter(date);
            if(withSecond){
                currentDateTime = currentDateTime+" "+timeFilter(hour)+":"+timeFilter(minute)+":"+timeFilter(second);
            }
            return;
        }
        currentDateTime = year +"-"+ timeFilter(month)+"-"+timeFilter(date);
        if(withSecond && hourCombobox!=null && hourCombobox.getValue()!=null){
            currentDateTime = currentDateTime+" "+hourCombobox.getValue().toString()+":"+minuteCombobox.getValue().toString()+":"+secondCombobox.getValue().toString();
        }else{
            System.out.println("你选择的日期是:"+currentDateTime);
            timeField.setText(currentDateTime);
        }
    }

    private String timeFilter(int val){
        String str;
        if(val<10){
            str = "0"+val;
        }else{
            str = ""+val;
        }
        return str;
    }

    private void setComboBoxs(){
        timeCombobox.getChildren().addAll(getCombo("时"),getCombo("分"),getCombo("秒"));
    }

    private HBox getCombo(String text){
        HBox main = new HBox();
        main.setStyle("-fx-alignment: center;");
        main.prefWidthProperty().bind(timeCombobox.widthProperty().subtract(20).divide(3));
        main.prefHeightProperty().bind(timeCombobox.heightProperty());
        ComboBox comboBox = new ComboBox();
        comboBox.prefWidthProperty().bind(main.widthProperty().multiply(2).divide(3));
        comboBox.prefHeightProperty().bind(main.heightProperty());
        Label label = new Label("  "+text);
        label.prefWidthProperty().bind(main.widthProperty().multiply(1).divide(3));
        label.prefHeightProperty().bind(main.heightProperty());
        comboBox.getSelectionModel().selectedIndexProperty().addListener((ov,oldv,newv)->{
            if(text.equals("时") && newv.intValue()!=hour){
                setCurrentDateTime();
            }else if(text.equals("分") && newv.intValue()!=minute){
                setCurrentDateTime();
            }else if(text.equals("秒") && newv.intValue()!=second){
                setCurrentDateTime();
            }
        });
        main.getChildren().addAll(comboBox,label);

        ObservableList<String> items = FXCollections.observableArrayList();
        if(text.equals("时")){
            setRange(24,items);
            comboBox.setValue(timeFilter(hour));
            hourCombobox = comboBox;
        }else if(text.equals("分")){
            setRange(60,items);
            comboBox.setValue(timeFilter(minute));
            minuteCombobox = comboBox;
        }else if(text.equals("秒")){
            setRange(60,items);
            comboBox.setValue(timeFilter(second));
            secondCombobox = comboBox;
        }
        comboBox.setItems(items);
        return main;
    }

    private void setRange(int range, ObservableList<String> items){
        int k =0;
        while (k<range){
            if(k<10){
                items.add("0"+k);
            }else{
                items.add(String.valueOf(k));
            }
            k++;
        }
    }

    //获取某月中天数
    private int getDaysOfMonth(Integer curMonth) {
       Date dateTime = new Date(curMonth==0?(year-1):year,curMonth==0?(12):curMonth,0);
       return dateTime.getDate();
    }

    //获取某一天是星期几
    private int getWeekNumber(int day){
        Date dateTime = new Date();
        dateTime.setYear(year);
        dateTime.setMonth(month-1);
        dateTime.setDate(day);
        c.setTime(dateTime);
        int dayOfWeek = c.get(Calendar.DAY_OF_WEEK)-2;
        if(dayOfWeek<0)
            dayOfWeek = 6;
        return dayOfWeek;
    }
    //错误提示区
    public HBox errBox;
    public Label errLabel;
    public HBox getDateTimeTool(){
        timeField.setEditable(false);
        if(withSecond){
            timeField.setMinWidth(200);
            timeField.setMaxWidth(200);
        }else {
            timeField.setMinWidth(150);
            timeField.setMaxWidth(150);
        }
        //错误提示区
        errBox = new HBox();
        errBox.setStyle("-fx-background-color: #59A1FC;-fx-max-height: 25;-fx-opacity: 0;");
        errLabel = new Label("这是错误信息");
        errLabel.setStyle("-fx-text-fill: white;");
        HBox arrow = new HBox();
        arrow.translateYProperty().bind(errBox.heightProperty().multiply(-0.25));
        arrow.setStyle("-fx-translate-x:8;-fx-background-color: #59A1FC;-fx-max-width:30;-fx-max-height:10;-fx-shape: 'M 0 10 L 10 0 L 20 10 z';");
        errBox.translateYProperty().bind(errBox.heightProperty());

        if(circleType){
            timeField.setStyle("-fx-border-radius: 20;-fx-background-radius: 20;");
        }

        HBox hBox = new HBox();
        StackPane stackPane = new StackPane();
        stackPane.setAlignment(Pos.CENTER_RIGHT);
        Button btn = new Button();
        String style = ("-fx-translate-x:-10;")+
                "-fx-background-color:transparent;-fx-pref-width:22;-fx-pref-height:18;-fx-cursor:hand;" +
                "-fx-background-image: url('/image/date-bg.png');-fx-background-size:70%;-fx-background-repeat:no-repeat;-fx-background-position:center;";
        btn.setStyle(style);//背景偏移 x=1 y=3
        btn.setOnMouseClicked(oa->{
            x = oa.getScreenX()-oa.getX();
            y = oa.getScreenY()-oa.getY();

            //先取消显示错误信息
            showDateErrorInfo("");
            showDatePicker();
        });

        Button btnCancel = new Button();
        String cancelStyle = ("-fx-translate-x:-30;-fx-opacity:1;")+
                "-fx-background-color:transparent;-fx-pref-width:22;-fx-cursor:hand;" +
                "-fx-background-image: url('/image/forbidden.png');-fx-background-repeat:no-repeat;-fx-background-position:center;";
        btnCancel.setStyle(cancelStyle);
        btnCancel.setOnMouseClicked(oa->{
           setCalendarTime();
           timeField.clear();
        });

        StackPane errGraphic = new StackPane();
        errGraphic.setAlignment(Pos.TOP_LEFT);
        errGraphic.setStyle("-fx-padding: 3;");
        errGraphic.getChildren().add(arrow);
        errGraphic.getChildren().add(errLabel);
        errBox.getChildren().add(errGraphic);

        //第一层为:textField
        stackPane.getChildren().add(timeField);
        //第二层为:日期弹框按钮
        stackPane.getChildren().add(btn);
        //第三层为:清除按钮
        stackPane.getChildren().add(btnCancel);
        if(!withSecond){
            //第四层为:错误提示
            stackPane.getChildren().add(errBox);
        }
        hBox.getChildren().add(stackPane);
        return hBox;
    }

    //formatType 1 表示按年月日+时分秒格式化 2表示按年月日格式化
    public String isTimeCorrect(String startTimeStr, String endTimeStr, int formatType, Boolean isStart){
        Date start = null;
        Date end = null;
        Date now = new Date();
        String message = "";
        SimpleDateFormat formater = formatType==1?sdf:sdfSecond;
        try {
            if(startTimeStr.length()==0 && endTimeStr.length()==0){
                //都为空则不用判断
                return message;
            }
            now = formater.parse(formater.format(now));
            if(startTimeStr.length()>0){
                start = formater.parse(startTimeStr);
                if(start.getTime()>now.getTime() && isStart)
                    return "起始时间必须小于当前时间";
            }
            if(endTimeStr.length()>0){
                end = formater.parse(endTimeStr);
                if(end.getTime()>now.getTime() && !isStart)
                    return "结束时间必须小于当前时间";
            }

            if(start!=null && end!=null){
                if(start.getTime()>end.getTime())
                    return isStart?"起始时间必须小于结束时间":"结束时间必须大于起始时间";
            }
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return message;
    }

    public void showDateErrorInfo(String message){
        if("".equals(message)){
            this.errBox.setOpacity(0);
        }else{
            this.errBox.setOpacity(1);
            this.errLabel.setText(message);
        }
    }

}

2.CSS样式(本组件专用datePicker.css)

.root{
    /*主体颜色设置*/
    -fx-accent: #5b8cff;
    -fx-focus-color: #5b8cff;
}

.label{
    -fx-font-size: 1.2em;
    -fx-text-fill: gray;
}
.button{
    -fx-cursor: hand;
    -fx-border-radius: 0;
}
/*#layoutMain{
    -fx-background-color:transparent;
}*/
#layout{
    -fx-background-color: white;
    -fx-border-radius: 4;
    -fx-effect: dropshadow(two-pass-box,rgba(160,180,220,0.85), 15,0, 0, 0);
}
#confirmBtn{
    -fx-text-fill: #5b8cff;
    -fx-min-width: 175;
    -fx-min-height:39;
    -fx-background-color: white;
}
#cancelBtn{
    -fx-text-fill: #CDD0D1;
    -fx-min-width: 175;
    -fx-min-height:39;
    -fx-background-color: white;
    -fx-border-style:  hidden solid hidden hidden;
    -fx-border-color:#EBEBEB;
}
#confirmBtn:hover,#cancelBtn:hover{
    -fx-text-fill: white;
    -fx-background-color: #5b8cff;
}
/*combo-box样式*/
.combo-box{
    -fx-background-color: #F4F4F4;
    -fx-text-fill: #CDD0D1;
    -fx-border-color: #4877e7;
    -fx-border-style: hidden ;
}
.combo-box > .text-field{
    -fx-background-color:transparent;
    -fx-border-color: transparent;
}
.combo-box > .text-field:focused{
    -fx-background-color:transparent;
    -fx-border-color: transparent;
}
.combo-box-base > .arrow-button {
    -fx-background-color: transparent;
}
.combo-box-base > .arrow-button > .arrow{
    -fx-background-color:#4877e7;
}
#weekBox .label{
    -fx-text-fill: #9E9E9E;
}
#datePick .button{
    -fx-font-size: 0.83em;
    -fx-pref-width: 35;
    -fx-pref-height: 35;
    -fx-border-radius: 50%;
    -fx-background-radius: 50%;
    -fx-background-color: transparent;
}
#yearMonthBox .label{
    -fx-text-fill: black;
}

3.还有本组件专用图片(加qq群(835259695)免费下载!):
在这里插入图片描述
4.组件调用方式

 VBox bodyBox = new VBox();
 bodyBox.setStyle("-fx-spacing: 50;-fx-padding: 20;");

 //日历输入框为方形,无时分秒
 DatePicker datePicker1 = new DatePicker(false, false);
 //日历输入框为圆形,无时分秒
 DatePicker datePicker2 = new DatePicker(false, true);
 //日历输入框为方形,有无时分秒
 DatePicker datePicker3 = new DatePicker(true, false);
 //日历输入框为圆形,有无时分秒
 DatePicker datePicker4 = new DatePicker(true, true);

 //在自己的box中加入组件
 bodyBox.getChildren().addAll(
         datePicker1.getDateTimeTool(),
         datePicker2.getDateTimeTool(),
         datePicker3.getDateTimeTool(),
         datePicker4.getDateTimeTool()
 );

//获取日期控件的值
String time = xzlDatePicker1.timeField.getText().trim();
Java Swing日历记事本:纯文本存储的离线笔记工具 日历记事本是一种轻量级桌面应用,本质是基于GUI事件驱动模型的本地数据管理工具。其核心原理在于将日期映射为文件路径,通过Swing组件树实现用户交互闭环,利用Java NIO完成纯文本的CRUD操作。技术价值体现在零依赖、可调试、易扩展——无需数据库或网络,所有逻辑直击JDK原生API,特别适合Java初学者理解‘代码如何变成界面’。典型应用场景包括实验日志归档、每日复盘记录、教学项目原型开发等。本文详解一个基于Swing与UTF-8纯文本存储的日历记事本实现。 阅读详情

相关推荐

用Qt构建个人日程管理工具:从数据模型到打包发布全流程

在桌面应用开发领域,框架选型直接影响着产品的性能与体验。对于日程管理这类轻量级本地工具,C++与Qt的组合凭借其高效的运行时表现和成熟的控件生态,成为平衡开发效率与资源占用的理想选择。理解数据库设计、定时器触发、系统托盘交互等底层原理,是构建可靠应用的基础。通过SQLite实现本地数据的结构化存储,利用QTimer与系统通知机制完成精准的日程提醒,再借助QCustomPlot进行时间分布的可视化呈现,开发者能够快速搭建出功能完整的桌面日程工具。这类技术方案不仅适用于个人待办管理,还可扩展至会议调度、任务追踪

weixin_26850069的博客 181

javaFX学习之DatePicker日期控件

JavaFX中的DatePicker控件提供了从给定日历中选择某一天的功能 在JDK8中引入的日期和时间API允许你对日期和时间数据进行各种操作,包括根据不同时区设置日历和本地时间。 在日期和时间API中的基础包是java.time。它提供了如下类来定义基于国际标准化组织(ISO)历法的日历系统中的时间。 · Clock ——时钟类可以指定一个时区,它可以获得当前的时刻、日期和时间 · Duration ——表示一段时间 · Instant ——表示在时间轴上的一个瞬间 · LocalDate—

zy103118的博客 6796

JavaFX_ DateTimePicker.jar

JavaFX中的日期时间选择控件,来自于github开源项目https://github.com/taipeiben/DateTimePicker,这个是自己打包的jar

JavaFX初探(时间选择器)

JavaFX初探(时间选择器)本章我们主要介绍javafX时间选择器的使用,描述了DatePicker控件的基本特性。 javaFX的DatePicker控件可以让我们从一个给定的日历中选择一天,主要用于网站或应用中需要用户输入一个日期。使用时间数据和日期格式JDK8中新的日期API可以让我们执行非常多的日期操作,包括设置日历和通过时区来这是本地时间。 日期的基本包是java.time。提供了下

貌似君子的专栏 1万+

javaFX日历控件

javaFx日历控件代码,可自定义皮肤。

基于LabVIEW控制仪器检测与监控 --普源示波器DS1102Z-E

LabVIEW 控制普源示波器 代码实现与解释

s0101100的博客 4237

javafx工具软件

javafx工具软件: 1.主界面 2.集成浏览器-加入博客介绍 3.组件拖动与放大缩小 4.组件旋转 5.组件随窗口大小变化 5.集成sqlite数据库 6.自定义日历组件 7. 定位清晰,每个页面代码都在一个page类中 各类功能在本人其它博客里面有详细介绍及使用方法,本项目做了个集成,源码已上传群文件,可以加qq群(835259695)免费下载! 喜欢的老铁请给小生一个赞 ~_~ 转载请注明出处! ...

u012698467的博客 2231

用Python的fengwo模块复刻通达信筹码峰(COST/WINNER),选股效率提升10倍

本文介绍了如何使用Python的fengwo模块高效复刻通达信的筹码峰(COST/WINNER)计算,显著提升选股效率。通过C++内核与多线程优化,fengwo模块将传统Python实现的数小时计算压缩至分钟级,解决了量化交易中的性能瓶颈问题。文章详细解析了筹码峰计算原理、fengwo模块的技术架构及实战应用,助力量化开发者构建高效选股系统。

weixin_29062823的博客 444

探索高效日历管理:CalendarFX - 现代化、可定制的日历组件库

在日常的工作和生活中,日历管理是不可或缺的一部分。对于开发者来说,集成一个功能强大且易于定制的日历组件可以使应用程序增色不少。就是这样一款强大的开源项目,它为Java开发者提供了丰富的日历和时间管理功能。 ## 项目简介 CalendarFX是一个基于JavaFX的开放源代码库,由DLSC Software Consulting GmbH开发并维护。该项目的目标是提供一套直观、美观且可高度自定

gitblog_00055的博客 588

STM32实战:增量式PID控制气体流量(附完整代码与调参技巧)

本文详细解析了如何在STM32平台上实现气体流量控制的增量式PID算法。内容涵盖从系统硬件架构选型、增量式PID算法原理与代码实现,到ADC采样滤波、PWM驱动配置等关键外设驱动,并提供了完整的参数整定技巧与工程调优实战指南,帮助开发者构建稳定可靠的气体流量控制系统。

rose2的博客 633

二维码扫描与页面跳转的完整流程解析

本文详细解析了二维码扫描与页面跳转的完整流程,从核心原理到前后端实现,涵盖了二维码生成、扫码事件处理、后端验证机制及跳转逻辑等关键环节。特别介绍了如何使用qrcode.js生成二维码、WebSocket处理扫码状态以及JWT令牌验证设计,帮助开发者构建安全高效的扫码跳转系统。

cicd6pipeline的博客 1096

javafx窗口拖动工具类

javafx窗口移动工具类

u012698467的博客 1134

保姆级教程:用GATK4分析重测序数据,从fq.gz到vcf文件一步不落

本文提供了一份详细的GATK4重测序数据分析教程,涵盖从原始fq.gz文件到最终vcf文件的完整上游分析流程。通过Miniconda环境配置、数据质控、序列比对、变异检测等步骤的逐步指导,帮助生物信息学研究人员掌握标准流程,特别适合Linux命令行基础薄弱的研究者学习实践。

weixin_28366053的博客 495

探索 JFXtras Labs:JavaFX 的强大扩展库

探索 JFXtras Labs:JavaFX 的强大扩展库 去发现同类优质开源项目:https://gitcode.com/ JFXtras Labs 是一个用于 JavaFX 的开源扩展库,提供了许多有用的组件、控件和实用工具。本篇文章将深入探讨它的特性和功能,帮助您更好地了解并利用 JFXtras Labs 提升您的 JavaFX 应用程序的用户体验和功能。 JFXtras Labs 是什么?...

gitblog_00025的博客 661

我的世界1.20.1forge模组开发(8)——自定义实体、AI

Overridethis,true,// 仅排除雪傀儡和同类e ->!这段代码是一个实体类的注册行为,通过重写方法来设定实体在游戏中的行为目标。在这段代码中,为一个名为SnowMonster的实体注册了多个行为目标。:设定SnowMonster实体在20 ticks内以5.0的力量进行远程攻击的行为目标。PanicGoal:设定SnowMonster实体在受到惊吓时会进行惊慌行为的目标。:设定SnowMonster实体会避开强大目标的行为目标。

qq_24992377的博客 2087

Linux系统中u-boot启动流程分析(详解)

代码部分,具体如下;

嵌入式技术开发 1996

Atlantafx 控件库详解:现代 JavaFX 开发必备的 15 个增强组件

Atlantafx 是一个现代化的 JavaFX CSS 主题集合,提供了丰富的增强控件库,为 JavaFX 开发者带来了前所未有的界面设计体验。这个强大的工具集不仅包含美观的现代化主题,还提供了超过 15 个精心设计的增强组件,让您的 JavaFX 应用程序拥有媲美现代 Web 应用的用户界面。 ## 📦 Atlantafx 核心功能概览 Atlantafx 的核心价值在于它为 JavaF

gitblog_00094的博客 668

【项目实战】自动化测试软件VectorCAST介绍

VectorCAST是一款先进的自动化测试软件。VectorCAST是一款功能强大、易于使用的自动化测试软件。VectorCAST适用于各种嵌入式系统的测试。VectorCAST为嵌入式系统的测试提供了一种高效、可靠的解决方案。VectorCAST提供了一整套完整的测试工具,包括测试管理、代码覆盖、缺陷定位、报告生成等,以帮助开发人员提高测试效率,确保软件质量。VectorCAST支持。

奶爸的编程之路,也就一周冷个三天 2018

【亲测免费】 探索GemsFX:高效且灵活的Java GUI组件库

探索GemsFX:高效且灵活的Java GUI组件库 是一个开源项目,由DLSC Software Consulting GmbH开发并维护。这个项目提供了一系列高级的Java GUI组件和工具,旨在增强JavaFX应用的功能和用户体验。本文将深入探讨其技术特性、应用场景及亮点,以期吸引更多的开发者加入到GemsFX的使用行列。 项目概述 GemsFX的主要目标是为JavaFX开发者提供一套强大的...

gitblog_00083的博客 625

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

霍尼韦尔SoftMaster使用说明

霍尼韦尔SoftMaster使用说明

CalendarFX 教程

CalendarFX 的源代码仓库包含了多个模块,主要目录结构如下: 1. **CalendarFX** - 主模块,包含核心的 JavaFX 日历视图组件。 2. **CalendarFXSampler** - 基于 FXSampler 的演示应用,用于独立测试各种日历控件。 3. **CalendarFXApp** - 演示应用,展示日、周、月和年视图。 4. **CalendarFXiCa

gitblog_00071的博客 392

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

5.9-5.10学习总结

还有一个最大的问题,上面所有发请求 都是基于短连接,而不是基于长连接。这个是很大的一个问题,由于登录之后开启的是长连接,上面的功能点应该都是基于长连接实现而不是短连接。已经是实现了个人修改资料,在资料里面修改密码,老师创建课程,学生添加课程,老师删除课程,退出系统关闭socket,结束进程。还有就是通过ListView会将在页面初始化的时候将老师和学生已有的课程显示出来,个人资料:包括生日(日期栏选择),手机号,邮箱,学号,姓名。登录,注册,忘记密码,个人资料,修改密码。就是还没实现双击点击进入课程。

shu_yamini的博客 978

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

如何为java添加日历控件_java 如何在jtextfiled里面添加日历组件

/*** @param jframe 外部的JFrame对象* @param model 是否模式窗口,即该窗口独占所有操作* @param jtextfield 外部JFrame里面的一个JTextField对象即要填入的日期文本域* @param screen_x 外部的JTextField点击触发一个MouseListener事件,传入e.getXOnScreen() 和 ...

weixin_36427002的博客 568

java可视化日历的基本编写,零基础入门到精通,收藏这篇就够了

L4阶段:大模型的微调和私有化部署,我们会更加深入的探讨Transformer架构,学习大模型的微调技术,利用DeepSpeed、Lamam Factory等工具快速进行模型微调;而L3 L4更多的是通过项目实战来掌握大模型的应用开发,针对以上大模型的学习路线我们也整理了对应的学习视频教程,和配套的学习资料。在你已经掌握了大模型技术之后,就需要开始准备面试,我们将提供精心整理的大模型面试题库,涵盖当前面试中可能遇到的各种技术问题,让你在面试中游刃有余。,当你的理论知识积累到一定程度,就需要通过项目实战,

Libra1313的博客 518

java实现万年历(附带源码)

java实现万年历(附带源码)

欢迎来到我的博客!这里是一个专注于计算机技术的分享平台,涵盖编程开发、算法研究、系统架构、软件工程等多个领域。无论你是初学者还是资深开发者,都能在这里找到有价值的内容。 1017

Android 选择器(Picker)开源库全景图鉴:时间、日历、地址、文件与颜色选择的完整选型指南

本篇指南以 AndroidLibs 仓库中「[选择器Picker](https://link.gitcode.com/i/a9146e6aa0b5ad80aa1c59ff5e31e218)」分类为绝对骨架,系统梳理其中收录的 90+ 个 Android 选择器开源组件。内容覆盖时间/日期选择、日历组件、滚轮与联动选择、文件/目录选择、地址/国家/城市选择、颜色选择、数字刻度选择等全部分类。读完本文

gitblog_00647的博客 140

dsh-our-free-model 三步装完:桌面端免费模型配置一次到位,不踩坑

插件文件放好了、版本号钉死了、bundles 也登记了,DSHEAC AIO 桌面端却拒绝启动,界面直接白屏,只剩下一个错误码 `PROFILE_UPGRADE_REQUIRED`。本文面向 DSHEAC AIO 与 DeepSeek Harness 桌面端,把 dsh-our-free-model 这个免费模型插件的桌面端安装路径一次讲清:三步放好文件、钉好版本、登记 bundles,附启动前自

gitblog_00483的博客 160
上一篇: javafx窗口自由缩放工具类
下一篇: javafx窗口拖动工具类
徐志林
博客等级 码龄13年 31粉丝 17原创
评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值