您的位置:程序门 -> java -> gui 设计



欢迎屏幕


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


欢迎屏幕
发表于:2008-01-04 10:05:19 楼主
如何制作一闪而过的欢迎屏幕,比如说ms   office
进入时的图片
发表于:2008-01-04 10:24:561楼 得分:0
发表于:2008-01-04 11:02:352楼 得分:0
http://tech.sina.com.cn/s/2006-04-19/1457909992.shtml
使用jdk/jre   6以上的版本,挺方便的.
发表于:2008-01-04 16:18:023楼 得分:0
jre6以下用jwindow来实现
发表于:2008-01-04 16:47:024楼 得分:0
jwindow
发表于:2008-01-05 04:46:525楼 得分:0
看来要研究一下jdk1.6的了.以前一直用低版本的.
发表于:2008-01-05 20:02:206楼 得分:0
能举个例子吗?谢谢.
发表于:2008-01-08 22:29:247楼 得分:0
我n年前的源码(去掉了一些):
java code
import javax.swing.*; import java.awt.*; import java.awt.event.*; public class app { jframe frame; jwindow splash; public app(graphicsconfiguration gc) { frame = new jframe("app", gc); createsplash(); swingutilities.invokelater(new runnable() { public void run() { showsplash(); splash.repaint(); } }); initframe(); swingutilities.invokelater(new runnable() { public void run() { showframe(); hidesplash(); } }); } private void createsplash() { splash = new jwindow(frame); splash.getcontentpane().add(new jlabel(new imageicon("images/splash.jpg"))); splash.pack(); rectangle rec = frame.getgraphicsconfiguration().getbounds(); splash.setlocation(rec.x + rec.width/2 - splash.getsize().width/2, rec.y + rec.height/2 - splash.getsize().height/2); } private void showsplash() { splash.show(); } private void hidesplash() { splash.setvisible(false); splash = null; } private void initframe() { // some code here } private void showframe() { frame.pack(); frame.setvisible(true); frame.repaint(); } public static void main(string[] args) { new app(graphicsenvironment.getlocalgraphicsenvironment().getdefaultscreendevice().getdefaultconfiguration()); } }


快速检索

最新资讯
热门点击