بسم الله الرحمن الرحيم
تفضلوا هذا/**
* Copyright © 2003
* @author abdollah abdelhamed boda_2003@hotmail.com
* A Swing-based top level window class.
* program present flash by class paint
*/
/*
///////////
//////////
/////////
////////
///////
//////
/////
////
///
//
/
*/
import javax.swing.JFrame;
import java.awt.Dimension;
import java.awt.Rectangle;
import java.awt.Color;
import java.awt.*;
import javax.swing.*;
public class bodaflash extends JFrame
{
int flash3,flash4;
int lengthboda,lengthboda1;
String flash1="";
String flash2="";
String boda,boda1;
public bodaflash()
{
try
{
jbInit();
}
catch(Exception e)
{
e.printStackTrace();
}
}
private void jbInit() throws Exception
{
this.setBackground(new Color(124, 180, 212));
this.getContentPane().setLayout(null);
this.setTitle("boda");
this.setResizable(false);
this.setBounds(new Rectangle(100, 100, 455, 150));
this.setFont(new Font("Andalus",Font.ITALIC,20));
boda=" boda boda boda ";
boda1=" please .......I hope see you boda_2003@hotmail.com ";
lengthboda=boda.length();
lengthboda1=boda1.length();
ImageIcon oo=new ImageIcon("boda.gif");
Image o=oo.getImage();
setIconImage(o);
this.show();
emy();
}
public void emy()
{
for(flash3=0;flash3
{
try
{
repaint();
Thread.sleep(100);
}
catch(Exception e)
{
}
}
for(flash4=0;flash4
{
try
{
repaint();
Thread.sleep(100);
}
catch(Exception e)
{
}
}
}
public void paint(Graphics g)
{
if(flash3>0)
{
g.setColor(new Color(204,18,212));
flash1=flash1+boda.charAt(flash3);
g.drawString(flash1,75,50);
}
if(flash4>0)
{
g.setColor(new Color(79,61,212));
flash2=flash2+boda1.charAt(flash4);
g.drawString(flash2,10,80);
}
}
public static void main(String arg[])
{
new bodaflash();
}
}