import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import javax.swing.JFrame;
import javax.swing.JSpinner;
import javax.swing.SpinnerNumberModel;
public class Test{
public static void main( String[] args ) throws Exception{
JSpinner spinnerA = new JSpinner( new SpinnerNumberModel( 1, 1, 999, 1 ));
JSpinner spinnerB = new JSpinner( new SpinnerNumberModel( 1, 1, 1000000, 1 ));
JFrame frame = new JFrame();
frame.setLayout( new GridBagLayout() );
frame.add( spinnerA, new GridBagConstraints( 0, 0, 1, 1, 1.0, 1.0,
GridBagConstraints.CENTER, GridBagConstraints.NONE,
new Insets( 0, 0, 0, 0 ), 0, 0 ) );
frame.add( spinnerB, new GridBagConstraints( 0, 1, 1, 1, 1.0, 1.0,
GridBagConstraints.CENTER, GridBagConstraints.NONE,
new Insets( 0, 0, 0, 0 ), 0, 0 ) );
frame.setVisible( true );
}
}