home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Languages Suite
/
ProgLangD.iso
/
VCAFE.3.0A
/
Main.bin
/
MonthSpinner.java
< prev
next >
Wrap
Text File
|
1998-08-21
|
1KB
|
44 lines
package symantec.itools.awt.util.spinner;
// 08/28/97 LAB Updated version to 1.1. Made it get list of months from java localization
// support (Addresses Mac Bug #7370 and #7374).
// 08/29/97 CAR constructor now sets Max index to 11
/**
* Month spin control.<br>
* Creates a text box, containing a list Months,
* with up and down arrows. Allows your user
* to move through a set of fixed values or type a valid value in the box.
*
* @see ListSpinner
*
* @version 1.1, August 28, 1997
*
* @author Symantec
*
*/
public class MonthSpinner extends ListSpinner
{
/**
* Construct MonthSpinner component. This component includes
* the months in the order Janruary through December. By default,
* the inial display of this component is the item "Janruary".
*/
public MonthSpinner()
{
java.text.DateFormatSymbols dfs = new java.text.DateFormatSymbols();
String months[] = dfs.getMonths();
//??? LAB ??? The last item is blank, why?
int length = months.length > 12 ? 12 : months.length;
for(int i = 0; i < length; ++i)
addItem(months[i]);
try {
setMax(11);
} catch (java.beans.PropertyVetoException e) {}
}
}