blob: 03f32f10bc5181c831090ef63cc2a1cf416433ff (
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 javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import bjc.utils.gui.layout.HLayout;
public class SimpleInputPanel extends JPanel {
private static final long serialVersionUID = -4734279623645236868L;
public final JTextField inputValue;
public SimpleInputPanel(String label, int columns) {
setLayout(new HLayout(2));
JLabel inputLabel = new JLabel(label);
if (columns < 1) {
inputValue = new JTextField();
} else {
inputValue = new JTextField(columns);
}
add(inputLabel);
add(inputValue);
}
}
|