From 9f7c44a1afe2a599a9e0249b480cfa3b4155e9e6 Mon Sep 17 00:00:00 2001 From: tspitzer Date: Thu, 17 Oct 2013 14:41:12 +0200 Subject: Version vom 17.10 -Hinweise eingefügt -Freigabe GUI ohne funktionalität eingefügt -Fenster zentriert -Download und Upload um Informationen erweitert --- Dozentenmodul/src/GUI/ActionChooser.java | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'Dozentenmodul/src/GUI/ActionChooser.java') diff --git a/Dozentenmodul/src/GUI/ActionChooser.java b/Dozentenmodul/src/GUI/ActionChooser.java index 7e65b673..d861e71e 100644 --- a/Dozentenmodul/src/GUI/ActionChooser.java +++ b/Dozentenmodul/src/GUI/ActionChooser.java @@ -1,6 +1,9 @@ package GUI; +import java.awt.Dimension; import java.awt.FlowLayout; +import java.awt.Toolkit; +import javax.swing.JFrame; import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JPanel; @@ -25,7 +28,7 @@ import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; @SuppressWarnings("serial") -public class ActionChooser extends JDialog { +public class ActionChooser extends JFrame { private final JPanel contentPanel = new JPanel(); String[] result; @@ -63,7 +66,11 @@ public class ActionChooser extends JDialog { e.printStackTrace(); } setTitle("Dozentenmodul"); - setBounds(100, 100, 545, 366); + Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); + int top=(screenSize.height - 545) / 2; + int left=(screenSize.width - 366) / 2; + setBounds(left, top, 545, 366); + //setBounds(100, 100, 545, 366); getContentPane().setLayout(null); { JPanel panel = new JPanel(); @@ -91,31 +98,36 @@ public class ActionChooser extends JDialog { contentPanel.setLayout(null); radioButton = new JRadioButton("Erstellen einer neuen VL"); + radioButton.setEnabled(false); buttonGroup.add(radioButton); radioButton.setHorizontalAlignment(SwingConstants.CENTER); radioButton.setBackground(Color.WHITE); - radioButton.setBounds(6, 7, 141, 23); + radioButton.setBounds(6, 30, 141, 23); contentPanel.add(radioButton); radioButton_1 = new JRadioButton("Erstellen einer neuen VL auf Basis einer VL Rohling"); + radioButton_1.setSelected(true); buttonGroup.add(radioButton_1); radioButton_1.setBackground(Color.WHITE); - radioButton_1.setBounds(6, 30, 265, 23); + radioButton_1.setBounds(6, 7, 265, 23); contentPanel.add(radioButton_1); JRadioButton radioButton_2 = new JRadioButton("Bearbeiten einer bestehenden VL"); + radioButton_2.setEnabled(false); buttonGroup.add(radioButton_2); radioButton_2.setBackground(Color.WHITE); radioButton_2.setBounds(6, 53, 185, 23); contentPanel.add(radioButton_2); JRadioButton radioButton_3 = new JRadioButton("Kopieren einer bestehenden VL"); + radioButton_3.setEnabled(false); buttonGroup.add(radioButton_3); radioButton_3.setBackground(Color.WHITE); radioButton_3.setBounds(6, 76, 175, 23); contentPanel.add(radioButton_3); JRadioButton radioButton_4 = new JRadioButton("Verlinken einer bestehenden VL"); + radioButton_4.setEnabled(false); buttonGroup.add(radioButton_4); radioButton_4.setBackground(Color.WHITE); radioButton_4.setBounds(6, 102, 175, 23); -- cgit v1.2.3-55-g7522