blob: fd981ec75443a3f22fe6837cf321e2a4f44425cc (
plain)
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
|
package bjc.utils.gui.panels;
import java.awt.BorderLayout;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
public class SimpleInputPanel extends JPanel {
private static final long serialVersionUID = -4734279623645236868L;
public final JTextField inputValue;
public SimpleInputPanel(String label, int columns) {
setLayout(new BorderLayout());
JLabel inputLabel = new JLabel(label);
if (columns < 1) {
inputValue = new JTextField();
} else {
inputValue = new JTextField(columns);
}
add(inputLabel, BorderLayout.LINE_START);
add(inputValue, BorderLayout.CENTER);
}
}
|