-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvsco.java
50 lines (42 loc) · 1.27 KB
/
vsco.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
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
public class Vsco extends JFrame {
/**
*
*/
private static final long serialVersionUID = -6029172243670358973L;
protected JButton cancelButton, okButton;
protected JPanel buttonsPanel;
public Vsco(String title) {
super(title);
}
protected void addComponents() {
cancelButton = new JButton("Cancel");
okButton = new JButton("OK");
buttonsPanel = new JPanel();
buttonsPanel.add(cancelButton);
buttonsPanel.add(okButton);
this.setContentPane(buttonsPanel);
}
protected void setFrameFeatures() {
pack();
setLocationRelativeTo(null);
setDefaultLookAndFeelDecorated(true);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setVisible(true);
}
public static void createAndShowGUI(){
Vsco msw = new Vsco("My Simple Window");
msw.addComponents();
msw.setFrameFeatures();
}
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
createAndShowGUI();
}
});
}
}