[英]creating a spashscreen and making it to stay for few seconds
I wanted a spashscreen to be shown, it should stay a few a seconds so the user can read the contents in splash screen. 我希望显示一个spashscreen,它应该停留几秒钟,以便用户可以读取初始屏幕中的内容。
I have made all my .jar files into a single .jar file by adding the below code in build.xml, 通过在build.xml中添加以下代码,我已将所有.jar文件制作成一个.jar文件,
<!-- Change the value of this property to be the name of your JAR, minus the .jar extension. It should not have spaces. <property name="store.jar.name" value="MyJarName"/> --> <property name="store.jar.name" value="store"/> <!-- don't edit below this line --> <property name="store.dir" value="store"/> <property name="store.jar" value="${store.dir}/${store.jar.name}.jar"/> <echo message="Packaging ${application.title} into a single JAR at ${store.jar}"/> <delete dir="${store.dir}"/> <mkdir dir="${store.dir}"/> <jar destfile="${store.dir}/temp_final.jar" filesetmanifest="skip"> <zipgroupfileset dir="dist" includes="*.jar"/> <zipgroupfileset dir="dist/lib" includes="*.jar"/> <manifest> <attribute name="Main-Class" value="${main.class}"/> </manifest> </jar> <zip destfile="${store.jar}"> <zipfileset src="${store.dir}/temp_final.jar" excludes="META-INF/*.SF, META-INF/*.DSA, META-INF/*.RSA"/> </zip> <delete file="${store.dir}/temp_final.jar"/>
I am using netbeans. 我正在使用netbeans。 The jar file is created by right clicking on the build xml file,
通过右键单击构建xml文件创建jar文件,
Run Target -> Other Targets -> package-for-store 运行目标->其他目标->商店包装
Any clue how to build the splash screen and hold it for a few seconds? 有什么线索可以建立启动画面并保持几秒钟吗?
Thanks 谢谢
JWindow
(it's already undecorated). JWindow
(尚未装饰)。 javax.swing.Timer
to "wait" a given period of time. javax.swing.Timer
来“等待”给定的时间。 When the timer triggers, close the window and use the "main" class reference to load the rest of the application. Additional... 额外...
You could also take a look at How to Create a Splash Screen 您也可以看看如何创建启动画面
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.