-
Notifications
You must be signed in to change notification settings - Fork 0
/
ProgressPanel.java
51 lines (41 loc) · 1.07 KB
/
ProgressPanel.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
/*
Maxwell Hull, Dan Cavero, and Claire Li
Apr 15, 2012
Program to implement a panel class for a JProgressBar in Music Player.
*/
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import javax.swing.*;
public class ProgressPanel extends JPanel
{
private PlayerFrame frame;
private JProgressBar progress;
private JLabel label1;
private JLabel label2;
public ProgressPanel(PlayerFrame aframe)
{
super();
frame = aframe;
setBackground(Color.WHITE);
this.setLayout(new BorderLayout());
label1 = new JLabel("0:00");
this.add(label1, BorderLayout.WEST);
progress = new JProgressBar();
this.add(progress, BorderLayout.CENTER);
label2 = new JLabel("0:00");
this.add(label2, BorderLayout.EAST);
}
public JLabel getLabel1()
{
return label1;
}
public JLabel getLabel2()
{
return label2;
}
public JProgressBar getProgress()
{
return progress;
}
}