-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLoadPanel.java
More file actions
101 lines (69 loc) · 2.6 KB
/
LoadPanel.java
File metadata and controls
101 lines (69 loc) · 2.6 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
//Panel for loading documents
import java.awt.*;
import javax.swing.*;
public class LoadPanel extends JPanel
{
//Constructor
public LoadPanel()
{
super();
setLayout();
}
//Set layout of the load panel
private void setLayout()
{
this.setLayout(new BorderLayout());
JPanel panel = new JPanel(new GridLayout(5,0)); //this panel creates a grid holds three panels
JPanel p1 = new JPanel(new BorderLayout());
JPanel p1subPanel = new JPanel(new FlowLayout());
JPanel p2 = new JPanel(new BorderLayout());
JPanel p3 = new JPanel(new BorderLayout());
JPanel p3subPanel = new JPanel(new FlowLayout());
JPanel p4 = new JPanel(new BorderLayout());
JTextField fileTextField = new JTextField("",90);
JLabel textFileLabel = new JLabel("TextFile:");
JButton browseButton = new JButton("Browse");
String[] file = {"Project Guten Burge File","The File Of Anand", "Anand and The Three Little Pigs File","What The Anand File"};
JComboBox types = new JComboBox(file); //Drop down menu
JLabel fileType = new JLabel(" Text File Type:");
JTextField tf = new JTextField("",48);
JLabel label = new JLabel("Title:");
JTextField tf2 = new JTextField("",48);
JLabel label2 = new JLabel("Author:");
JButton processButton = new JButton("Process");
p1subPanel.add(textFileLabel);
p1subPanel.add(fileTextField);
p1subPanel.add(browseButton);
p1.add(p1subPanel, BorderLayout.WEST);
p2.add(fileType, BorderLayout.WEST); //file with dropdown
p2.add(types, BorderLayout.CENTER);
p3subPanel.add(label); //adds title/author with txt boxes
p3subPanel.add(tf);
p3subPanel.add(label2);
p3subPanel.add(tf2);
p3.add(p3subPanel, BorderLayout.WEST);
p4.add(processButton, BorderLayout.WEST); //adds button
panel.add(p1); //this adds to the panel that goes inside the main panel
panel.add(p2);
panel.add(p3);
panel.add(new JSeparator());
panel.add(p4);
//this.add(panel); //added everything to main panel
//frame.getContentPane().add(MAINPANEL, BorderLayout.NORTH);
//add text area to loadPanel
JTextArea textArea = new JTextArea(
"Opus: \n" +
"Title: \n" +
"Author: \n" +
"Opus Size: \n"+
"Opus Number; \n"+
"New Index terms: \n"+
"New Postings: \n"+
"Total Index terms: \n"+
"Total Postings: \n"
);
JScrollPane sp = new JScrollPane(textArea);
this.add(sp, BorderLayout.CENTER);
this.add(panel, BorderLayout.NORTH);
}
}