forked from llovett/CAMusic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCAMusicWrapper.java
54 lines (43 loc) · 1.06 KB
/
CAMusicWrapper.java
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
import java.awt.Frame;
import java.awt.Dimension;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.WindowConstants;
import java.awt.BorderLayout;
public class CAMusicWrapper extends Frame {
CAMusic cam;
public CAMusicWrapper() {
constructComponents();
}
public void constructComponents() {
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent we) {
// cam.finish();
System.exit(0);
}
});
setLayout(new BorderLayout());
setTitle("CAMusic");
cam = new CAMusic();
cam.init();
// cam.setup();
setResizable(false);
setMinimumSize(new Dimension(
cam.getWidth(),
cam.getHeight())
);
setPreferredSize(new Dimension(
cam.getWidth(),
cam.getHeight())
);
add(cam, BorderLayout.CENTER);
}
public static void main(String[] args) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
CAMusicWrapper camw = new CAMusicWrapper();
camw.setVisible(true);
}
});
}
}