diff options
author | Simon Rettberg | 2018-01-29 17:21:31 +0100 |
---|---|---|
committer | Simon Rettberg | 2018-01-29 17:21:31 +0100 |
commit | f15ca29f21911d57bcd05928610cc02797f28577 (patch) | |
tree | fbf8b8da429ae905bb5940a362583a0f1ea7dd4d /dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard | |
parent | [client] Fix endless stream of exceptions in specific Linux setups (diff) | |
download | tutor-module-f15ca29f21911d57bcd05928610cc02797f28577.tar.gz tutor-module-f15ca29f21911d57bcd05928610cc02797f28577.tar.xz tutor-module-f15ca29f21911d57bcd05928610cc02797f28577.zip |
[client] Fix NPE with JDatePicker (by updating it)
Fixes #3292
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard')
-rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureCreationPageLayout.java | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureCreationPageLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureCreationPageLayout.java index f3944cfd..5df21c1d 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureCreationPageLayout.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/LectureCreationPageLayout.java @@ -1,8 +1,6 @@ package org.openslx.dozmod.gui.wizard.layout; import java.util.Calendar; -import java.util.Date; -import java.util.Properties; import javax.swing.JScrollPane; import javax.swing.JSpinner; @@ -11,15 +9,12 @@ import javax.swing.JTextField; import javax.swing.SpinnerDateModel; import javax.swing.text.DateFormatter; -import org.jdatepicker.impl.JDatePanelImpl; -import org.jdatepicker.impl.UtilDateModel; import org.openslx.dozmod.gui.Gui; import org.openslx.dozmod.gui.control.QDatePickerImpl; import org.openslx.dozmod.gui.control.QLabel; import org.openslx.dozmod.gui.helper.GridManager; import org.openslx.dozmod.gui.wizard.Wizard; import org.openslx.dozmod.gui.wizard.WizardPage; -import org.openslx.dozmod.util.DateLabelFormatter; @SuppressWarnings("serial") public abstract class LectureCreationPageLayout extends WizardPage { @@ -32,14 +27,6 @@ public abstract class LectureCreationPageLayout extends WizardPage { protected final JSpinner spnEndTime; protected final QLabel lblCalcPeriod; - private static final Properties pickerStrings = new Properties(); - - static { - pickerStrings.put("text.today", "Heute"); - pickerStrings.put("text.month", "Monat"); - pickerStrings.put("text.year", "Jahr"); - } - /** * Page for creating lectures * @@ -69,16 +56,14 @@ public abstract class LectureCreationPageLayout extends WizardPage { grid.nextRow(); // Start date/time - dtpStartDate = new QDatePickerImpl(new JDatePanelImpl(new UtilDateModel(new Date()), pickerStrings), - new DateLabelFormatter()); + dtpStartDate = new QDatePickerImpl(); spnStartTime = makeTimeSpinner(0, 0); grid.add(new QLabel("Startdatum")); grid.add(dtpStartDate).fill(true, false).expand(true, false); grid.add(spnStartTime); grid.nextRow(); - dtpEndDate = new QDatePickerImpl(new JDatePanelImpl(new UtilDateModel(new Date()), pickerStrings), - new DateLabelFormatter()); + dtpEndDate = new QDatePickerImpl(); spnEndTime = makeTimeSpinner(23, 59); grid.add(new QLabel("Enddatum")); grid.add(dtpEndDate).fill(true, false).expand(true, false); |