-
Bug
-
Resolution: Not an Issue
-
P3
-
None
-
5.0
-
generic
-
generic
This is regarding the JSpinner value field when the JSpinner() no-arg constructor is used. According to the spec, this method will construct a spinner with an Integer SpinnerNumberModel with initial value 0 and no minimum or maximum limits.
In the following test, when the frame is first show on the screen, the spinner is displayed with "0" as the initial value. But when increment the number to 10 or greater, or negative number, the number is not completely show.
------------------------------------------------------------------
import java.awt.*;
import javax.swing.*;
public class ST {
public static void main(String [] args) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
JFrame jf = new JFrame();
jf.setSize(100, 100);
JSpinner spinner = new JSpinner();
JPanel panel = new JPanel();
panel.setLayout(new FlowLayout());
panel.add(spinner);
jf.getContentPane().setLayout(new BorderLayout());
jf.getContentPane().add("Center", panel);
jf.setVisible(true);
}
});
}
}
----------------------------------------------------------------------------
Should the value field be automatically adjusted when needed ?
In the following test, when the frame is first show on the screen, the spinner is displayed with "0" as the initial value. But when increment the number to 10 or greater, or negative number, the number is not completely show.
------------------------------------------------------------------
import java.awt.*;
import javax.swing.*;
public class ST {
public static void main(String [] args) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
JFrame jf = new JFrame();
jf.setSize(100, 100);
JSpinner spinner = new JSpinner();
JPanel panel = new JPanel();
panel.setLayout(new FlowLayout());
panel.add(spinner);
jf.getContentPane().setLayout(new BorderLayout());
jf.getContentPane().add("Center", panel);
jf.setVisible(true);
}
});
}
}
----------------------------------------------------------------------------
Should the value field be automatically adjusted when needed ?