java飞屏制作 如何在登录系统时制作飞屏?请各位高人给予指点!不胜感激!!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 飛屏 應該是 登陸時候 顯示的那個 制作者 版本 什么的 然后自己消失那個 吧?用jdialog 就行吧(去掉邊框) 用timer控制下時間 就行了 是不是就是eclipse中的splash image? 用来启动应用程序前显示版本信息的窗口?? //////////////////////////////////////////////// program splashProject; uses Forms, unitMain in 'unitMain.pas' {FrmMain}, unitSplash in 'unitSplash.pas' {frmSplash}; {$R *.res} begin Application.Initialize; frmSplash := TfrmSplash.Create(Application); frmSplash.Show; frmSplash.Update; Application.Title := 'this is a splash Form!!!!!'; Application.CreateForm(TFrmMain, FrmMain); frmSplash.Hide; //frmSplash.Update; frmSplash.Free; Application.Run; end. ////////////////////////////////////////////////// 是不是加载没完成时显示的一个画面,Java Application启动画面的制作 SplashScreen splashScreen = SplashScreen.getSplashScreen(); // 难道是这个import java.awt.Dimension;import javax.swing.JFrame;@SuppressWarnings("serial")public class FFrame extends JFrame { private static double sArc = 0.0; private static int r, cx, cy; private int _w, _h, d; static { Dimension de = java.awt.Toolkit.getDefaultToolkit().getScreenSize(); double sw = de.getWidth(); double sh = de.getHeight(); sArc = - 1.5707963267948966 - Math.atan(sw/sh*2); cx = (int)(sw / 2); cy = (int)(sh / 2); r = (int)Math.pow(cx*cx+cy*cy, 0.5); } public void fly() { this._w = this.getWidth(); this._h = this.getHeight(); this.d = 0; this.setSize(0, 0); new Thread() {public void run() { while (d<=360) moveFrame(); }}.start(); } private void moveFrame() { d += 10; double t = 1.0 * d / 360; double t2 = 6.283185307179586*t+sArc; int vx = (int)(cx+Math.cos(t2)*r*(1-t)); int vy = (int)(cy+Math.sin(t2)*r*(1-t)); this.setLocation(vx-_w*d/720, vy-_h*d/720); this.setSize(_w*d/360, _h*d/360); try { Thread.sleep(20); } catch (Exception e) {} } public static void main(String[] args) { FFrame frm = new FFrame(); frm.setDefaultCloseOperation(javax.swing.JFrame.DISPOSE_ON_CLOSE); frm.setSize(500, 300); frm.setLocation(300, 200); frm.fly(); frm.setVisible(true); }} // 启动画面import java.awt.Color;import java.awt.Dimension;import java.awt.Font;import java.awt.Graphics;import java.awt.Image;import java.awt.Toolkit;import java.io.File;import java.io.IOException;import javax.imageio.ImageIO;import javax.swing.JDialog;@SuppressWarnings("serial")public class SplashScreen extends JDialog { private Image img = null; public SplashScreen() { this.setUndecorated(true); this.setSize(600, 224); Toolkit toolkit = Toolkit.getDefaultToolkit(); Dimension de = toolkit.getScreenSize(); this.setLocation((de.width - this.getWidth()) / 2, (de.height - this.getHeight() - 40) / 2); try { img = ImageIO.read(new File("2009-000180.jpg")); Graphics g = img.getGraphics(); g.setFont(new Font("华文行楷", Font.BOLD, 32)); g.setColor(Color.RED); g.drawString("欢迎欢迎!", 100, 60); g.dispose(); } catch (IOException e) { e.printStackTrace(); } } public void setVisible(boolean b) { super.setVisible(b); if (b) new Thread() { public void run() { // 五秒后关闭 try { Thread.sleep(5000); } catch (InterruptedException e) { } dispose(); } }.start(); } public void paint(Graphics g) { if (img != null) g.drawImage(img, 0, 0, this); } public static void main(String[] args) { new SplashScreen().setVisible(true); }} 我欲哭无泪! 如何获取当前运行的方法名称 一道题,进来试试··不难也不容易 D o u b l e类型是不是有BUG啊!或者是缺陷?有原码! 这个代码哪里不对 一个很简单的程序,但是编译的时候总是报错,麻烦大家帮忙看看 简单的Double去两边的0的问题 关于println很简单的问题,俺还就是想不通,看看我这四个程序的运行结果 一道关于垃圾收集器的面试题 日文系统下Java无法编译中文注释 简单sql的问题 URL类抓页面数据,中文字符不抓取问题?
用jdialog 就行吧(去掉邊框) 用timer控制下時間 就行了
////////////////////////////////////////////////
program splashProject;
uses
Forms,
unitMain in 'unitMain.pas' {FrmMain},
unitSplash in 'unitSplash.pas' {frmSplash};
{$R *.res}
begin
Application.Initialize;
frmSplash := TfrmSplash.Create(Application);
frmSplash.Show;
frmSplash.Update;
Application.Title := 'this is a splash Form!!!!!';
Application.CreateForm(TFrmMain, FrmMain);
frmSplash.Hide;
//frmSplash.Update;
frmSplash.Free;
Application.Run;
end.
//////////////////////////////////////////////////
// 难道是这个
import java.awt.Dimension;
import javax.swing.JFrame;@SuppressWarnings("serial")
public class FFrame extends JFrame {
private static double sArc = 0.0;
private static int r, cx, cy;
private int _w, _h, d;
static {
Dimension de = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
double sw = de.getWidth();
double sh = de.getHeight();
sArc = - 1.5707963267948966 - Math.atan(sw/sh*2);
cx = (int)(sw / 2);
cy = (int)(sh / 2);
r = (int)Math.pow(cx*cx+cy*cy, 0.5);
}
public void fly() {
this._w = this.getWidth();
this._h = this.getHeight();
this.d = 0;
this.setSize(0, 0);
new Thread() {public void run() {
while (d<=360) moveFrame();
}}.start();
}
private void moveFrame() {
d += 10;
double t = 1.0 * d / 360;
double t2 = 6.283185307179586*t+sArc;
int vx = (int)(cx+Math.cos(t2)*r*(1-t));
int vy = (int)(cy+Math.sin(t2)*r*(1-t));
this.setLocation(vx-_w*d/720, vy-_h*d/720);
this.setSize(_w*d/360, _h*d/360);
try { Thread.sleep(20); } catch (Exception e) {}
}
public static void main(String[] args) {
FFrame frm = new FFrame();
frm.setDefaultCloseOperation(javax.swing.JFrame.DISPOSE_ON_CLOSE);
frm.setSize(500, 300);
frm.setLocation(300, 200);
frm.fly();
frm.setVisible(true);
}
}
// 启动画面
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.Toolkit;
import java.io.File;
import java.io.IOException;import javax.imageio.ImageIO;
import javax.swing.JDialog;@SuppressWarnings("serial")
public class SplashScreen extends JDialog {
private Image img = null;
public SplashScreen() {
this.setUndecorated(true); this.setSize(600, 224);
Toolkit toolkit = Toolkit.getDefaultToolkit();
Dimension de = toolkit.getScreenSize();
this.setLocation((de.width - this.getWidth()) / 2, (de.height
- this.getHeight() - 40) / 2);
try {
img = ImageIO.read(new File("2009-000180.jpg"));
Graphics g = img.getGraphics();
g.setFont(new Font("华文行楷", Font.BOLD, 32));
g.setColor(Color.RED);
g.drawString("欢迎欢迎!", 100, 60);
g.dispose();
} catch (IOException e) {
e.printStackTrace();
}
}
public void setVisible(boolean b) {
super.setVisible(b);
if (b) new Thread() {
public void run() {
// 五秒后关闭
try { Thread.sleep(5000);
} catch (InterruptedException e) { }
dispose();
}
}.start();
} public void paint(Graphics g) {
if (img != null)
g.drawImage(img, 0, 0, this);
}
public static void main(String[] args) {
new SplashScreen().setVisible(true);
}
}