FileDocCategorySizeDatePackage
DayOfTheWeekService.javaAPI DocExample1770Sat Jan 08 12:06:56 GMT 2005None

DayOfTheWeekService

public class DayOfTheWeekService extends Object implements Service

Fields Summary
JLabel
outputLabel
JComboBox
month
JTextField
day
JTextField
year
Constructors Summary
Methods Summary
public javax.swing.JPanelgetGuiPanel()

       JPanel panel = new JPanel();
       JButton button = new JButton("Do it!");
       button.addActionListener(new DoItListener());
       outputLabel = new JLabel("date appears here");
       
       DateFormatSymbols dateStuff = new DateFormatSymbols();      
       month = new JComboBox(dateStuff.getMonths());
       day = new JTextField(8);
       year = new JTextField(8);

       JPanel inputPanel = new JPanel(new GridLayout(3,2));
       inputPanel.add(new JLabel("Month"));
       inputPanel.add(month);
       inputPanel.add(new JLabel("Day"));
       inputPanel.add(day);
       inputPanel.add(new JLabel("Year"));    
       inputPanel.add(year);

       panel.add(inputPanel);
       panel.add(button);
       panel.add(outputLabel);
       return panel;