//import the packages for using the classes in them into the program
import java.awt.*;
import javax.swing.*;
/**
*A public class
*/
public class Logo extends JWindow {
//constructor of Logo
public Logo() {
//for creating the panel
JPanel panel =
new JPanel() {
//for painting the component
public void paintComponent(Graphics g) {
//for getting the image
ImageIcon img = new ImageIcon(ClassLoader.getSystemResource("images/Logo.JPG"));
//for drawing the image
g.drawImage(img.getImage(), 0, 0, null);
super.paintComponent(g);
}
};
panel.setOpaque(false);
//for setting the border
panel.setBorder(BorderFactory.createEtchedBorder());
//for setting the panel in the contentPane
setContentPane(panel);
//for setting the ContentPane to true
//for setting the background
panel.setBackground(Color.black);
//for setting the size
setSize(350,250);
/****************************************
*for setting the program in the center *
*@see center.java *
****************************************/
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
setLocation((screenSize.width - getSize().width)/2,(screenSize.height-getSize().height) / 2);
setVisible(true);
}
}