-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTextEditorFrame.java
More file actions
53 lines (45 loc) · 1.36 KB
/
TextEditorFrame.java
File metadata and controls
53 lines (45 loc) · 1.36 KB
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
package view;
import java.awt.BorderLayout;
import java.awt.Dimension;
import javax.swing.JFrame;
import javax.swing.JLabel;
/**
* Description
*
* @author swkumar (swkumar@groupon.com)
* @since 1.0.0
*/
public class TextEditorFrame extends JFrame {
private static final String NAME = "Text Editor";
private TextEditorScrollPane textEditorScrollPane;
private TextEditorMenuBar textEditorMenuBar;
private JLabel label = new JLabel();
public TextEditorFrame() {
super(NAME);
initilaze();
setFrameSpecs();
}
private void initilaze() {
textEditorScrollPane = new TextEditorScrollPane();
textEditorMenuBar = new TextEditorMenuBar();
label.setPreferredSize(new Dimension(400, 20));
this.add(textEditorScrollPane, BorderLayout.CENTER);
this.setJMenuBar(textEditorMenuBar);
this.add(label, BorderLayout.PAGE_END);
}
private void setFrameSpecs() {
this.setLayout(new BorderLayout());
this.setSize(800, 500);
this.setVisible(true);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
public TextEditorScrollPane getTextEditorScrollPane() {
return textEditorScrollPane;
}
public TextEditorMenuBar getTextEditorMenuBar() {
return textEditorMenuBar;
}
public JLabel getLabel() {
return label;
}
}