blob: be474919b4d171b23c1138be11d94e1dad89370e (
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;
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);
}
}
|