Browse Source

Merge remote-tracking branch 'origin/master'

new_repo
Hauch IT 5 years ago
parent
commit
4f9d7fa1e5
  1. 2
      .idea/misc.xml
  2. 5
      Info Datei Nur für Alpha
  3. BIN
      out/production/Alpha/D_Geburtstag.class
  4. BIN
      out/production/Alpha/D_Test2.class
  5. BIN
      out/production/Alpha/D_Test3.class
  6. 50
      src/D_Test1.java
  7. 6
      src/Main.java

2
.idea/misc.xml

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" /> <output url="file://$PROJECT_DIR$/out" />
</component> </component>
</project> </project>

5
Info Datei Nur für Alpha

@ -1,4 +1,9 @@
Java AWT | BorderLayout Class 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. 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: Constructors:

BIN
out/production/Alpha/D_Geburtstag.class

BIN
out/production/Alpha/D_Test2.class

BIN
out/production/Alpha/D_Test3.class

50
src/D_Test1.java

@ -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");
}
});
}
}

6
src/Main.java

@ -7,6 +7,7 @@ public class Main {
JFrame fr = null; JFrame fr = null;
JMenuBar jmb = null; JMenuBar jmb = null;
JMenu jm = null; JMenu jm = null;
JMenu jm1 = null;
JPanel contantPane = null; JPanel contantPane = null;
JLabel label = null; JLabel label = null;
JMenuItem jmI = null; JMenuItem jmI = null;
@ -17,12 +18,13 @@ public class Main {
this.jmb = new JMenuBar(); this.jmb = new JMenuBar();
this.fr.setJMenuBar(jmb); this.fr.setJMenuBar(jmb);
this.jm = new JMenu("File");
this.jm = new JMenu("Menu");
this.jmb.add(jm); this.jmb.add(jm);
this.jmI = new JMenuItem("Exit"); this.jmI = new JMenuItem("Exit");
this.jm.add(jmI); this.jm.add(jmI);
this.jmI.addActionListener(new ActionListener1()); this.jmI.addActionListener(new ActionListener1());
this.jm1 = new JMenu("Info");
this.jmb.add(jm1);
this.contantPane = new JPanel(); this.contantPane = new JPanel();

Loading…
Cancel
Save