blob: e96bd91d1dc9e2f43cb8e555f0fd2b3f81fea3a8 (
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
|
package bjc.utils.gui;
import java.awt.BorderLayout;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JSpinner;
import javax.swing.SpinnerModel;
public class SimpleSpinnerPanel extends JPanel {
private static final long serialVersionUID = -4734279623645236868L;
public final JSpinner inputValue;
public SimpleSpinnerPanel(String label, SpinnerModel model) {
setLayout(new BorderLayout());
JLabel inputLabel = new JLabel(label);
inputValue = new JSpinner(model);
add(inputLabel, BorderLayout.LINE_START);
add(inputValue, BorderLayout.CENTER);
}
}
|