}
// ============= Protected Methods ============== //
// ============= Private Methods ============== //
private void setup(){
//rootPanel = new JPanel(new MigLayout("","grow","grow"));
rootPanel = new JPanel(new MigLayout());
measurementCB = new JComboBox(new Object[]{"kg","lbs"});
weightTF = new JTextField(20);
JLabel infoL = new JLabel("Weight");
cancelB = new JButton("Cancel");
addB = new JButton("Add");
doneB = new JButton("Done");
cancelB.addActionListener(this);
addB.addActionListener(this);
doneB.addActionListener(this);
datePanel = JDateComponentFactory.createJDatePanel();
datePanel.setShowYearButtons(true);
SpinnerNumberModel hourModel = new SpinnerNumberModel(0,0, 24,1);
hourSpinner = new JSpinner(hourModel);
SpinnerNumberModel minModel = new SpinnerNumberModel(0,0, 59,1);
minSpinner = new JSpinner(minModel);
JPanel timeP = new JPanel(new MigLayout());
timeP.add(new JLabel("Hour"));
timeP.add(new JLabel("Min"),"wrap");
timeP.add(hourSpinner);
timeP.add(minSpinner);
JPanel northP = new JPanel(new MigLayout());
northP.add(infoL);
northP.add(weightTF);
northP.add(measurementCB);
JPanel rightP = new JPanel(new MigLayout());
rightP.add(cancelB);
rightP.add(addB);
rightP.add(doneB);
JPanel southP = new JPanel(new MigLayout("fill"));
southP.add(timeP,"dock east,push,grow");
southP.add(rightP,"dock west,push,growy");
rootPanel.add(northP,"dock north");
rootPanel.add((JComponent)datePanel,"dock center");