278cdee0
pfrison
VRGNYMusicLights ...
|
1
|
import java.awt.BorderLayout;
|
d175ba55
pfrison
VRGNYMusicLight a...
|
2
|
import java.awt.Color;
|
278cdee0
pfrison
VRGNYMusicLights ...
|
3
4
|
import java.awt.Font;
|
d175ba55
pfrison
VRGNYMusicLight a...
|
5
|
import javax.swing.BorderFactory;
|
278cdee0
pfrison
VRGNYMusicLights ...
|
6
7
8
9
10
11
12
13
14
15
16
|
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JLabel;
import javax.swing.JPanel;
public class PlayJPanel extends JPanel {
private static final long serialVersionUID = 1L;
private static final Font titleFont = new Font(new JLabel().getFont().getName(), Font.BOLD, 14);
public PlayJPanel(Interface interf, LightCanvasJPanel lightCanvas) {
super(new BorderLayout());
|
d175ba55
pfrison
VRGNYMusicLight a...
|
17
|
setBorder(BorderFactory.createMatteBorder(4, 0, 0, 0, Color.LIGHT_GRAY));
|
278cdee0
pfrison
VRGNYMusicLights ...
|
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
// title
JLabel title = new JLabel("Visualizer :");
title.setFont(titleFont);
add(title, BorderLayout.NORTH);
// lights
JPanel centerPanel = new JPanel();
centerPanel.setLayout(new BoxLayout(centerPanel, BoxLayout.LINE_AXIS));
centerPanel.add(Box.createHorizontalGlue());
centerPanel.add(lightCanvas);
add(centerPanel, BorderLayout.CENTER);
// controls
interf.animPlayer = new AnimationPlayer(interf);
add(interf.animPlayer, BorderLayout.SOUTH);
}
}
|