我正在查看SplashDemo.javaJava Sun教程.该类说明了如何在应用程序启动时创建启动画面.SplashDemo直接在main方法中创建一个框架.在这个例子中,为什么不通过使用在事件调度线程上运行GUI代码运行invokeLater?
这是完整的来源:
/*
* Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* …Run Code Online (Sandbox Code Playgroud)