我在这里找到了一个很好的代码来将图像预加载到应用程序中。这很好。 // PRELOAD IMAGES
var images = {};
function loadImages(sources, callback) {
var loadedImages = 0;
var numImages = 0;
// get num of sources
for(v
我试图让我的JavaFX Preloader飞溅屏幕出现在我的应用程序之前。我使用的是Eclipse IDE,当我点击“运行”时,一半的时间启动屏幕将正确显示,另一半时间我会得到一个灰色或黑色的屏幕,而不是图像应该在哪里。 我不确定是什么问题导致它只能正确显示有时。 SplashController: public class SplashController extends Preloader