

/* Genomic Comparison Tool
   Master Thesis of computer science

   Author: Yue Lu
   Version: 1.1

*/


/* This is class who draws the background and welcome symbol
	of the DisplayPanel
*/

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.*;
import java.net.*;
import java.sql.*;
import java.io.*;
import java.lang.*;


public class background extends JPanel
{

	//paintComponent to paint the Image as the JPanel's background
	public void paintComponent(Graphics g)
   {
	    super.paintComponent(g);

		//Image back=Toolkit.getDefaultToolkit().getImage("DNA_b.gif");
                Image back=Toolkit.getDefaultToolkit().getImage("dna3.jpg");
                //get the size of the JPanel
		Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();

		//repeatly paint the image till it fill the whole JPanel
		for(int x=0; x<screenSize.width; x+=back.getWidth(this))
		{

			for(int y=0; y<screenSize.height; y+=back.getHeight(this))
			{
				g.drawImage(back,x, y,this);
			}
		}

		//draw the string for the message on the JPanel
		g.setFont(new Font("Serif", Font.BOLD|Font.ITALIC,24));
                g.setColor(new Color(0,0,255));
		g.drawString("        Genome Comparison Tool", screenSize.width/3, screenSize.height/4);

		g.setFont(new Font("Serif", Font.BOLD, 14));
		g.drawString("Author:            Yue Lu", screenSize.width/3+50, screenSize.height/4+50);
		g.drawString("System Design: Dr.George E. Fox,  Yue Lu", screenSize.width/3+50, screenSize.height/4+70);
		g.drawString("Version:            1.1",  screenSize.width/3+50, screenSize.height/4+90);

	}


}