资源简介

java javafx 界面开发 选课 系统 ,带设计文档说明,UI设计齐全,直接拿来用

资源截图

代码片段和文件信息

/*
 * To change this template choose Tools | Templates
 * and open the template in the editor.
 */
package org.tjumyk;

import com.sun.deploy.uitoolkit.impl.fx.ui.FXAboutDialog;
import java.util.logging.Level;
import java.util.logging.Logger;
import javafx.application.Platform;

/**
 *
 * @author E40-G8C
 */
public abstract class BackgroundRunner {

    private boolean waitForeground = false;

    /**
 * @tag label
 * name = “Abstract“
 */
    public abstract void background() throws Exception;

    public void foreground() throws Exception {
    }

    public abstract void handleException(Exception e) throws Exception;

    public abstract void finish() throws Exception;

    protected final void runForeground() {
        waitForeground = true;
        Platform.runLater(new Thread() {
            @Override
            public void run() {
                try {
                    foreground();
                } catch (Exception ex) {
                    try {
                        handleException(ex);
                    } catch (Exception ex1) {
                        ex1.printStackTrace();
                    }
                }
                waitForeground = false;
            }
        });
        while (waitForeground) {
            try {
                Thread.sleep(10);
            } catch (InterruptedException ex) {
                ex.printStackTrace();
            }
        }
    }

    private void handleExceptionInFxThread(final Exception e) {
        Platform.runLater(new Thread() {
            @Override
            public void run() {
                try {
                    handleException(e);
                } catch (Exception ex) {
                    ex.printStackTrace();
                }
            }
        });
    }

    public final void run() {
        new Thread() {
            @Override
            public void run() {
                try {
                    background();
                    Platform.runLater(new Thread() {
                        @Override
                        public void run() {
                            try {
                                finish();
                            } catch (Exception ex) {
                                try {
                                    handleException(ex);
                                } catch (Exception ex1) {
                                    ex1.printStackTrace();
                                }
                            }
                        }
                    });
                } catch (final Exception e) {
                    handleExceptionInFxThread(e);
                }
            }
        }.start();
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-06-06 18:04  DatabaseFinal\
     文件         539  2012-06-04 08:28  DatabaseFinal\.classpath
     文件         510  2012-06-04 08:26  DatabaseFinal\.project
     文件        3734  2012-06-01 15:30  DatabaseFinal\build.xml
     文件        1247  2012-06-03 18:10  DatabaseFinal\CourseManage.jnlp
     目录           0  2012-06-04 07:04  DatabaseFinal\lib\
     目录           0  2012-06-01 15:30  DatabaseFinal\lib\CopyLibs\
     文件       22335  2012-06-01 15:30  DatabaseFinal\lib\CopyLibs\org-netbeans-modules-java-j2seproject-copylibstask.jar
     目录           0  2012-06-01 15:30  DatabaseFinal\lib\junit\
     文件       73526  2012-06-01 15:30  DatabaseFinal\lib\junit\junit-3.8.2-api.zip
     文件      120640  2012-06-01 15:30  DatabaseFinal\lib\junit\junit-3.8.2.jar
     目录           0  2012-06-01 15:30  DatabaseFinal\lib\junit_4\
     文件      424758  2012-06-01 15:30  DatabaseFinal\lib\junit_4\junit-4.10-javadoc.jar
     文件      141185  2012-06-01 15:30  DatabaseFinal\lib\junit_4\junit-4.10-sources.jar
     文件      253160  2012-06-01 15:30  DatabaseFinal\lib\junit_4\junit-4.10.jar
     文件      785998  2011-02-08 18:25  DatabaseFinal\lib\mysql-connector-java-5.1.15-bin.jar
     文件         540  2012-06-01 15:30  DatabaseFinal\lib\nblibraries.properties
     文件      584207  2012-02-29 17:11  DatabaseFinal\lib\sqljdbc4.jar
     文件          85  2012-06-01 15:30  DatabaseFinal\manifest.mf
     文件        8779  2012-06-03 15:05  DatabaseFinal\model.mwb
     目录           0  2012-06-01 15:30  DatabaseFinal\nbproject\
     文件       78502  2012-06-01 15:30  DatabaseFinal\nbproject\build-impl.xml
     目录           0  2012-06-01 15:30  DatabaseFinal\nbproject\configs\
     文件           0  2012-06-04 10:12  DatabaseFinal\nbproject\configs\Run_as_WebStart.properties
     文件           0  2012-06-04 10:12  DatabaseFinal\nbproject\configs\Run_in_Browser.properties
     文件         475  2012-06-01 15:30  DatabaseFinal\nbproject\genfiles.properties
     文件      122379  2012-06-01 15:30  DatabaseFinal\nbproject\jfx-impl.xml
     目录           0  2012-06-01 16:04  DatabaseFinal\nbproject\private\
     目录           0  2012-06-01 15:30  DatabaseFinal\nbproject\private\configs\
     文件         204  2012-06-04 10:12  DatabaseFinal\nbproject\private\configs\Run_as_WebStart.properties
     文件         203  2012-06-04 10:12  DatabaseFinal\nbproject\private\configs\Run_in_Browser.properties
............此处省略46个文件信息

评论

共有 条评论