Name: jk109818 Date: 05/12/2003
FULL PRODUCT VERSION :
java version "1.4.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_02-b06)
Java HotSpot(TM) Client VM (build 1.4.1_02-b06, mixed mode)
FULL OS VERSION :
Microsoft Windows 2000 [Versi??n 5.00.2195]
A DESCRIPTION OF THE PROBLEM :
When I add a week in the JSpinner component and the week value is the last week of month in the calendar, the year field doesn??t roll to the next year. Sorry about my english ;) I speak spanish.
Best regards,
Maximiliano Palacios
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.util.Calendar;
import java.util.Date;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JSpinner;
import javax.swing.SpinnerDateModel;
public class MyJSpinner {
public static void main(String[] args) {
JFrame.setDefaultLookAndFeelDecorated(true);
JFrame frame = new JFrame("JSpinnerDemoBug");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JLabel emptyLabel = new JLabel("");
emptyLabel.setPreferredSize(new Dimension(300, 120));
frame.getContentPane().add(emptyLabel, BorderLayout.CENTER);
SpinnerDateModel sdm = new SpinnerDateModel(new Date(), null, null, Calendar.MONTH);
JSpinner js = new JSpinner(sdm);
js.setEditor(new JSpinner.DateEditor(js, "w MM/yyyy"));
frame.getContentPane().add(js);
frame.pack();
frame.setVisible(true);
}
}
---------- END SOURCE ----------
(Review ID: 185641)
======================================================================
|