diff options
| author | Nino Breuer | 2014-10-09 14:52:01 +0200 |
|---|---|---|
| committer | Nino Breuer | 2014-10-09 14:52:01 +0200 |
| commit | 39833fd5db8f92dcc4a34a623b6e4f59cde2e74f (patch) | |
| tree | e4db6866847c11ac27a339a58f2f220bf836490c /dozentenmodul/src/main/java/gui/lecture/SearchLecture_GUI.java | |
| parent | Merge branch 'master' of ssh://git.openslx.org/openslx-ng/tutor-module (diff) | |
| download | tutor-module-39833fd5db8f92dcc4a34a623b6e4f59cde2e74f.tar.gz tutor-module-39833fd5db8f92dcc4a34a623b6e4f59cde2e74f.tar.xz tutor-module-39833fd5db8f92dcc4a34a623b6e4f59cde2e74f.zip | |
• added possibility to change location of application
• set all JOptionPane positions relative to their parent
• known bug: relative position does not work when clicking "back" in ftpcreateimage
Diffstat (limited to 'dozentenmodul/src/main/java/gui/lecture/SearchLecture_GUI.java')
| -rw-r--r-- | dozentenmodul/src/main/java/gui/lecture/SearchLecture_GUI.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/dozentenmodul/src/main/java/gui/lecture/SearchLecture_GUI.java b/dozentenmodul/src/main/java/gui/lecture/SearchLecture_GUI.java index 4a8b9fd9..1f597cb3 100644 --- a/dozentenmodul/src/main/java/gui/lecture/SearchLecture_GUI.java +++ b/dozentenmodul/src/main/java/gui/lecture/SearchLecture_GUI.java @@ -4,6 +4,7 @@ import gui.intro.About_GUI; import gui.intro.MainMenue_GUI;
import java.awt.Color;
+import java.awt.Component;
import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.Point;
@@ -83,6 +84,7 @@ public class SearchLecture_GUI extends JFrame { private JTextField textFieldName;
JTabbedPane tabbedPane;
boolean activeSearch=false;
+ Component c = null;
String[] titles = { "Veranstaltungsname", "Beschreibung",
"Gültigkeitsdatum", "Aktiv", "Letzte Benutzung",
"Verantwortlicher", "Image", "Schlagwort", "ID" };
@@ -107,7 +109,7 @@ public class SearchLecture_GUI extends JFrame { /**
* Create the dialog.
*/
- public SearchLecture_GUI() {
+ public SearchLecture_GUI(Component formerGUI) {
addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent arg0) {
@@ -178,7 +180,7 @@ public class SearchLecture_GUI extends JFrame { setTitle("bwLehrpool Suite - Veranstaltung suchen");
// Zentriert das Fenster in die Bildmitte 2;
setBounds(0, 0, 842, 722);
- GuiOrganizer.centerGUI(this);
+ setLocationRelativeTo(formerGUI);
getContentPane().setLayout(null);
{
@@ -258,7 +260,7 @@ public class SearchLecture_GUI extends JFrame { // oeffnet das Hauptmenue
SearchLecture_GUI.this.setVisible(false);
- MainMenue_GUI main = new MainMenue_GUI();
+ MainMenue_GUI main = new MainMenue_GUI(c);
main.setVisible(true);
}
});
@@ -386,7 +388,7 @@ public class SearchLecture_GUI extends JFrame { public void actionPerformed(ActionEvent e) {
// oeffnet das Hauptmenue
- MainMenue_GUI main = new MainMenue_GUI();
+ MainMenue_GUI main = new MainMenue_GUI(c);
main.setVisible(true);
dispose();
}
@@ -558,6 +560,8 @@ public class SearchLecture_GUI extends JFrame { }
});
mnNewMenu_1.add(mntmAbout);
+
+ c = this;
}
|
