summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/gui/lecture/EditLectureAllgemein_GUI.java
diff options
context:
space:
mode:
Diffstat (limited to 'dozentenmodul/src/main/java/gui/lecture/EditLectureAllgemein_GUI.java')
-rw-r--r--dozentenmodul/src/main/java/gui/lecture/EditLectureAllgemein_GUI.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/dozentenmodul/src/main/java/gui/lecture/EditLectureAllgemein_GUI.java b/dozentenmodul/src/main/java/gui/lecture/EditLectureAllgemein_GUI.java
index 45d4b0e2..e66adea2 100644
--- a/dozentenmodul/src/main/java/gui/lecture/EditLectureAllgemein_GUI.java
+++ b/dozentenmodul/src/main/java/gui/lecture/EditLectureAllgemein_GUI.java
@@ -400,11 +400,11 @@ public class EditLectureAllgemein_GUI extends JFrame {
Lecture.lecture.setActive(false);
}
- Lecture.lecture.setName(textFieldLaborname.getText());
- Lecture.lecture.setDesc(description.getText());
+ Lecture.lecture.setName(textFieldLaborname.getText().trim());
+ Lecture.lecture.setDesc(description.getText().trim());
Lecture.lecture.setEnddate(dateChooserend.getDate());
Lecture.lecture.setStartdate(dateChooserstart.getDate());
- Image.image.setImagename(textFieldLaborname.getText());
+ Image.image.setImagename(textFieldLaborname.getText().trim());
EditLectureSearch_GUI sr = new EditLectureSearch_GUI(c);
sr.setVisible(true);
@@ -452,8 +452,8 @@ public class EditLectureAllgemein_GUI extends JFrame {
isDateMaxLifeTimeCorrect = true;
}
// Pruefen ob alles eingegeben wurde
- if (textFieldLaborname.getText().isEmpty() == true
- || description.getText().isEmpty() == true) {
+ if (textFieldLaborname.getText().trim().isEmpty() == true
+ || description.getText().trim().isEmpty() == true) {
// mind 1 Textfeld ist leer
isAllInformationReady = false;
JOptionPane
@@ -481,14 +481,14 @@ public class EditLectureAllgemein_GUI extends JFrame {
&& descriptionLenghtOK() == true) {
// everything is ok, proceed
Lecture.lecture.setNewName(textFieldLaborname
- .getText());
- Lecture.lecture.setDesc(description.getText());
+ .getText().trim());
+ Lecture.lecture.setDesc(description.getText().trim());
Lecture.lecture.setEnddate(dateChooserend.getDate());
Lecture.lecture.setStartdate(dateChooserstart
.getDate());
Image.image.setImagename(textFieldLaborname
- .getText());
+ .getText().trim());
PermissionEditLecture_GUI ev = new PermissionEditLecture_GUI(c);
ev.setVisible(true);
@@ -588,11 +588,11 @@ public class EditLectureAllgemein_GUI extends JFrame {
descriptionLengthOK = false;
// max length is 254 chars
- if (description.getText().length() >= MAX_DESCRIPTION_LENGTH) {
+ if (description.getText().trim().length() >= MAX_DESCRIPTION_LENGTH) {
descriptionLengthOK = false;
JOptionPane.showMessageDialog(c,
"Die Beschreibung darf max 254 Zeichen enthalten. Aktuell enthält sie "
- + description.getText().length() + ".",
+ + description.getText().trim().length() + ".",
"Beschreibung zu umfangreich",
JOptionPane.INFORMATION_MESSAGE);
} else {