diff --git a/.idea/misc.xml b/.idea/misc.xml index 0548357..e0844bc 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/Info Datei Nur für Alpha b/Info Datei Nur für Alpha index 4c33c0f..b3ff14e 100644 --- a/Info Datei Nur für Alpha +++ b/Info Datei Nur für Alpha @@ -1,4 +1,9 @@ Java AWT | BorderLayout Class + +https://www.geeksforgeeks.org/java-awt-borderlayout-class/ + + + BorderLayout is the default layout for the window objects such as JFrame, JWindow, JDialog, JInternalFrame etc. BorderLayout arranges the components in the five regions. Four sides are referred to as north, south, east, and west. The middle part is called the center. Each region can contain only one component and is identified by a corresponding constant as NORTH, SOUTH, EAST, WEST, and CENTER. Constructors: diff --git a/out/production/Alpha/D_Geburtstag.class b/out/production/Alpha/D_Geburtstag.class index cfb688f..dab36c1 100644 Binary files a/out/production/Alpha/D_Geburtstag.class and b/out/production/Alpha/D_Geburtstag.class differ diff --git a/out/production/Alpha/D_Test2.class b/out/production/Alpha/D_Test2.class index b7b3fff..d40e5dd 100644 Binary files a/out/production/Alpha/D_Test2.class and b/out/production/Alpha/D_Test2.class differ diff --git a/out/production/Alpha/D_Test3.class b/out/production/Alpha/D_Test3.class index 1544f4b..1685cc4 100644 Binary files a/out/production/Alpha/D_Test3.class and b/out/production/Alpha/D_Test3.class differ diff --git a/src/D_Test1.java b/src/D_Test1.java deleted file mode 100644 index a1cfee0..0000000 --- a/src/D_Test1.java +++ /dev/null @@ -1,50 +0,0 @@ -import java.awt .*; -import javax.swing .*; -import java.awt.event .*; - -public class D_Test1 { - - public static void main(String[] args) { - D_Test1 st = new D_Test1(); - } - - public D_Test1() { - JFrame frame = new JFrame("STUDENT REGISTRATION FORM"); - frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - frame.setSize(800, 600); - frame.setVisible(true); - - JPanel p1 = new JPanel(); - p1.setLayout(null); - p1.setBackground(Color.CYAN); - - frame.add(p1); - ButtonGroup buttonGroup = new ButtonGroup(); - JRadioButton male = new JRadioButton("MALE"); - male.setBounds(100, 170, 100, 20); - buttonGroup.add(male); - p1.add(male); - JRadioButton female = new JRadioButton("FEMALE"); - female.setBounds(250, 170, 100, 20); - buttonGroup.add(female); - p1.add(female); - JLabel sex = new JLabel("SEX:"); - sex.setBounds(10, 200, 100, 20); - p1.add(sex); - final JTextField gender = new JTextField(); - gender.setBounds(100, 200, 300, 20); - p1.add(gender); - - male.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent ie) { - gender.setText("MALE"); - } - }); - - female.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent ie) { - gender.setText("FEMALE"); - } - }); - } -} \ No newline at end of file diff --git a/src/Main.java b/src/Main.java index 951c4ad..09ad006 100644 --- a/src/Main.java +++ b/src/Main.java @@ -7,6 +7,7 @@ public class Main { JFrame fr = null; JMenuBar jmb = null; JMenu jm = null; + JMenu jm1 = null; JPanel contantPane = null; JLabel label = null; JMenuItem jmI = null; @@ -17,12 +18,13 @@ public class Main { this.jmb = new JMenuBar(); this.fr.setJMenuBar(jmb); - this.jm = new JMenu("File"); + this.jm = new JMenu("Menu"); this.jmb.add(jm); this.jmI = new JMenuItem("Exit"); this.jm.add(jmI); this.jmI.addActionListener(new ActionListener1()); - + this.jm1 = new JMenu("Info"); + this.jmb.add(jm1); this.contantPane = new JPanel();