-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.java
69 lines (44 loc) · 1.23 KB
/
MainWindow.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import javax.swing.*;
import java.awt.*;
public class MainWindow {
private JFrame f;
private JPanel p;
private JButton startButton;
private JButton pauseButton;
private JButton finishButton;
public MainWindow(){
gui();
}
public void gui()
{
f = new JFrame("cn.sribd.si");
f.setVisible(true);
f.setSize(600,400);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
p = new JPanel(new GridBagLayout());
p.setBackground(Color.lightGray);
startButton = new JButton("▶");
pauseButton = new JButton("▲");
finishButton = new JButton("■");
GridBagConstraints c = new GridBagConstraints();
c.insets = new Insets(10,10,10,10);
c.gridx = 0;
c.gridy = 1;
p.add(startButton,c);
c.gridx = 0;
c.gridy = 2;
p.add(pauseButton,c);
c.gridx = 1;
c.gridy = 2;
p.add(finishButton);
f.add(p);
}
public static void main(String[] args){
new MainWindow();
}
private JButton recordButton;
private JTextArea SRIBDSITextArea;
private JTextArea textArea1;
private JTextArea textArea2;
private JPanel panel1;
}