-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMy1.java
More file actions
88 lines (69 loc) · 1.63 KB
/
My1.java
File metadata and controls
88 lines (69 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
import java.awt.*;
import java.util.*;
import java.awt.event.*;
import javax.swing.*;
import java.net.URL;
import java.applet.AudioClip;
import java.applet.Applet;
class frame1 extends JFrame
{
URL audio=this.getClass().getResource("first.mp3");
AudioClip ac= Applet.newAudioClip(audio);
public frame1()
{
setVisible(true);
ac.play();
setTitle("AGPL");
setSize(1300,700);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setLocationRelativeTo(null);
setBackground(new Color(0,240,240));
setLayout(null);
create();
}
//AudioClip ac= Applet.newAudioClip(audio);
public void create()
{
//l1=new JLabel("PLAY GAMES");
l2=new JLabel("Loading...");
l3=new JLabel();
//l1.setBounds(0,350,1600,300);
//l1.setHorizontalAlignment(SwingConstants.CENTER);
l2.setHorizontalAlignment(SwingConstants.CENTER);
l3.setHorizontalAlignment(SwingConstants.CENTER);
l2.setBounds(0,400,1200,250);
l3.setSize(1300,700);
URL url=this.getClass().getResource("mypack\\agpl.PNG");
Icon back1=new ImageIcon(url);
l3.setIcon(back1);
//l1.setFont(new Font("Algerian", 1, 48));
l2.setFont(new Font("Algerian", 2, 36));
//add(l1);
add(l2);
add(l3);
setResizable(false);
close();
}
public void close()
{
sleep(10000);
dispose();
My2 m=new My2();
}
public void sleep(int x)
{
try
{
Thread.sleep(x);
}
catch(Exception e){}
}
private JLabel l2,l3; //l1
}
public class My1
{
public static void main(String args[])
{
frame1 ok=new frame1();
}
}