Browse Source

Entwicklung eines ButtonGroup Aktoren und der Verwendung der Klassen Quiz und Tage

new_repo
Hauch IT 5 years ago
parent
commit
f4280258a4
  1. 152
      .idea/workspace.xml
  2. 19
      JunitTest/src/Tage_DTest.java
  3. 143
      src/Main.java
  4. 87
      src/Tage_D.java
  5. 0
      src/bild.gif
  6. 0
      src/pic.jpg

152
.idea/workspace.xml

@ -1,14 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="41dc023d-0769-466f-850a-8e3eed9fe5fa" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/JunitTest/JunitTest.iml" afterDir="false" />
<list default="true" id="41dc023d-0769-466f-850a-8e3eed9fe5fa" name="Default Changelist" comment="Main Menü angepasst mit Auswahl und Action Listener erstellt. So das Unterklassen Objekte erzeugt werden">
<change afterPath="$PROJECT_DIR$/src/bild.gif" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/pic.jpg" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/D_Test2.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/D_Test3.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/JunitTest/src/Tage_DTest.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/Main.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Main.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/MainGUI.form" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/MainGUI.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/Tage_D.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Tage_D.java" afterDir="false" />
</list>
<ignored path="$PROJECT_DIR$/out/" />
@ -22,16 +20,36 @@
<option name="isMigrated" value="true" />
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="true">
<leaf>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Main.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="202">
<caret line="54" column="36" selection-start-line="54" selection-start-column="36" selection-end-line="54" selection-end-column="36" />
<state relative-caret-position="204">
<caret line="21" lean-forward="true" selection-start-line="21" selection-end-line="62" selection-end-column="34" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#1181#1313#0" expanded="true" />
<element signature="e#1312#1313#0" expanded="true" />
<element signature="e#1337#1470#0" expanded="true" />
<element signature="e#1469#1470#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/Tage_D.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1001">
<caret line="70" column="34" selection-start-line="70" selection-start-column="34" selection-end-line="70" selection-end-column="34" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#1717#1850#0" expanded="true" />
<element signature="e#1849#1850#0" expanded="true" />
<element signature="e#3120#3121#0" expanded="true" />
<element signature="e#3173#3174#0" expanded="true" />
<element signature="e#3298#3299#0" expanded="true" />
<element signature="e#3353#3354#0" expanded="true" />
<element signature="e#3479#3480#0" expanded="true" />
<element signature="e#3534#3535#0" expanded="true" />
</folding>
</state>
</provider>
@ -53,12 +71,15 @@
<find>contantPane</find>
<find>ETools</find>
<find>this.</find>
<find>fr.</find>
<find>exit</find>
</findStrings>
<replaceStrings>
<replace>this.</replace>
<replace>this.panel</replace>
<replace>Panele</replace>
<replace>MTools</replace>
<replace>this.fr.</replace>
</replaceStrings>
</component>
<component name="Git.Settings">
@ -73,15 +94,15 @@
<option value="$PROJECT_DIR$/src/Geburtstag.java" />
<option value="$PROJECT_DIR$/src/MainGUI.form" />
<option value="$PROJECT_DIR$/src/Tage_DTest.java" />
<option value="$PROJECT_DIR$/src/Tage_D.java" />
<option value="$PROJECT_DIR$/src/Main.java" />
<option value="$PROJECT_DIR$/src/Tage_D.java" />
</list>
</option>
</component>
<component name="ProjectFrameBounds" extendedState="6">
<option name="x" value="-7" />
<option name="width" value="974" />
<option name="height" value="1057" />
<option name="x" value="793" />
<option name="width" value="814" />
<option name="height" value="877" />
</component>
<component name="ProjectLevelVcsManager">
<ConfirmationsSetting value="2" id="Add" />
@ -91,6 +112,8 @@
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scope" />
<pane id="PackagesPane" />
<pane id="ProjectPane">
<subPane>
<expand>
@ -112,8 +135,6 @@
<select />
</subPane>
</pane>
<pane id="Scope" />
<pane id="PackagesPane" />
</panes>
</component>
<component name="PropertiesComponent">
@ -215,7 +236,8 @@
<workItem from="1562718828390" duration="103000" />
<workItem from="1562781684319" duration="923000" />
<workItem from="1562789348995" duration="2654000" />
<workItem from="1562848572975" duration="3638000" />
<workItem from="1562848572975" duration="6651000" />
<workItem from="1562856644601" duration="3700000" />
</task>
<task id="LOCAL-00001" summary="neue master">
<created>1562341097724</created>
@ -329,28 +351,35 @@
<option name="project" value="LOCAL" />
<updated>1562804715949</updated>
</task>
<option name="localTasksCounter" value="17" />
<task id="LOCAL-00017" summary="Main Menü angepasst mit Auswahl und Action Listener erstellt. So das Unterklassen Objekte erzeugt werden">
<created>1562853765189</created>
<option name="number" value="00017" />
<option name="presentableId" value="LOCAL-00017" />
<option name="project" value="LOCAL" />
<updated>1562853765189</updated>
</task>
<option name="localTasksCounter" value="18" />
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="19764000" />
<option name="totallyTimeSpent" value="26477000" />
</component>
<component name="ToolWindowManager">
<frame x="-8" y="-8" width="1616" height="886" extended-state="6" />
<editor active="true" />
<layout>
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.113753214" />
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.11503856" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info id="Image Layers" order="2" />
<window_info id="Designer" order="3" />
<window_info id="UI Designer" order="4" />
<window_info id="Capture Tool" order="5" />
<window_info id="Favorites" order="6" side_tool="true" />
<window_info active="true" anchor="bottom" id="Messages" order="0" visible="true" weight="0.32802126" />
<window_info anchor="bottom" id="Messages" order="0" weight="0.32802126" />
<window_info anchor="bottom" id="Message" order="1" />
<window_info anchor="bottom" id="Find" order="2" />
<window_info anchor="bottom" id="Run" order="3" weight="0.3306773" />
<window_info anchor="bottom" id="Debug" order="4" weight="0.39978564" />
<window_info active="true" anchor="bottom" id="Run" order="3" visible="true" weight="0.33466136" />
<window_info anchor="bottom" id="Debug" order="4" weight="0.3997344" />
<window_info anchor="bottom" id="Cvs" order="5" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="6" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="7" />
@ -382,7 +411,8 @@
<MESSAGE value="neue Tage Script" />
<MESSAGE value="neue GUI erstellt zum testen" />
<MESSAGE value="Junit für Tage_D erzeugt" />
<option name="LAST_COMMIT_MESSAGE" value="Junit für Tage_D erzeugt" />
<MESSAGE value="Main Menü angepasst mit Auswahl und Action Listener erstellt. So das Unterklassen Objekte erzeugt werden" />
<option name="LAST_COMMIT_MESSAGE" value="Main Menü angepasst mit Auswahl und Action Listener erstellt. So das Unterklassen Objekte erzeugt werden" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/src/testJFrame.java" />
@ -408,56 +438,64 @@
</entry>
<entry file="file://$PROJECT_DIR$/src/D_Geburtstag.java" />
<entry file="file://$PROJECT_DIR$/src/Quiz_E.java" />
<entry file="file://$PROJECT_DIR$/src/MainGUI.java">
<entry file="file://$PROJECT_DIR$/src/MainGUI.java" />
<entry file="file://$PROJECT_DIR$/src/MainGUI.form" />
<entry file="file://$PROJECT_DIR$/src/D_Test2.java" />
<entry file="file://$PROJECT_DIR$/src/D_Test3.java" />
<entry file="file://$PROJECT_DIR$/JunitTest/JunitTest.iml">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/src/MainGUI.form">
<provider selected="true" editor-type-id="ui-designer" />
</entry>
<entry file="file://$PROJECT_DIR$/src/D_Test2.java">
<entry file="file://$PROJECT_DIR$/JunitTest/src/Tage_DTest.java" />
<entry file="jar://C:/Program Files/Java/jdk1.8.0_111/src.zip!/javax/swing/JFrame.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="34">
<caret line="2" lean-forward="true" selection-start-line="2" selection-end-line="2" />
<state relative-caret-position="151">
<caret line="697" column="22" selection-start-line="697" selection-start-column="22" selection-end-line="697" selection-end-column="22" />
<folding>
<element signature="e#24496#24497#0" expanded="true" />
<element signature="e#24553#24554#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/D_Test3.java">
<entry file="jar://C:/Program Files/Java/jdk1.8.0_111/src.zip!/javax/swing/JRootPane.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="17">
<caret line="1" column="1" lean-forward="true" selection-start-line="1" selection-start-column="1" selection-end-line="1" selection-end-column="1" />
<state relative-caret-position="814">
<caret line="620" column="18" selection-start-line="620" selection-start-column="18" selection-end-line="620" selection-end-column="18" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Tage_D.java">
<entry file="file://$PROJECT_DIR$/src/pic.jpg">
<provider selected="true" editor-type-id="images" />
</entry>
<entry file="file://$PROJECT_DIR$/src/bild.gif">
<provider selected="true" editor-type-id="images" />
</entry>
<entry file="file://$PROJECT_DIR$/src/Main.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1275">
<caret line="79" column="55" lean-forward="true" selection-start-line="79" selection-start-column="55" selection-end-line="79" selection-end-column="55" />
<state relative-caret-position="204">
<caret line="21" lean-forward="true" selection-start-line="21" selection-end-line="62" selection-end-column="34" />
<folding>
<element signature="e#2602#2603#0" expanded="true" />
<element signature="e#2655#2656#0" expanded="true" />
<element signature="e#2780#2781#0" expanded="true" />
<element signature="e#2835#2836#0" expanded="true" />
<element signature="e#2961#2962#0" expanded="true" />
<element signature="e#3016#3017#0" expanded="true" />
<element signature="imports" expanded="true" />
<element signature="e#1337#1470#0" expanded="true" />
<element signature="e#1469#1470#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/JunitTest/src/Tage_DTest.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="85">
<caret line="5" column="23" selection-start-line="5" selection-start-column="23" selection-end-line="5" selection-end-column="23" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Main.java">
<entry file="file://$PROJECT_DIR$/src/Tage_D.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="202">
<caret line="54" column="36" selection-start-line="54" selection-start-column="36" selection-end-line="54" selection-end-column="36" />
<state relative-caret-position="1001">
<caret line="70" column="34" selection-start-line="70" selection-start-column="34" selection-end-line="70" selection-end-column="34" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#1181#1313#0" expanded="true" />
<element signature="e#1312#1313#0" expanded="true" />
<element signature="e#1717#1850#0" expanded="true" />
<element signature="e#1849#1850#0" expanded="true" />
<element signature="e#3120#3121#0" expanded="true" />
<element signature="e#3173#3174#0" expanded="true" />
<element signature="e#3298#3299#0" expanded="true" />
<element signature="e#3353#3354#0" expanded="true" />
<element signature="e#3479#3480#0" expanded="true" />
<element signature="e#3534#3535#0" expanded="true" />
</folding>
</state>
</provider>

19
JunitTest/src/Tage_DTest.java

@ -1,19 +0,0 @@
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
@RunWith(Arquillian.class)
public class Tage_DTest {
@Deployment
public static JavaArchive createDeployment() {
return ShrinkWrap.create(JavaArchive.class)
.addClass(Tage_D.class)
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
}
}

143
src/Main.java

@ -4,99 +4,130 @@ import java.awt.event.*;
public class Main {
//Variablen GUI
JButton button = null;
ImageIcon icon = null;
JFrame fr = null;
JMenuBar jmb = null;
JMenu jm = null;
JMenu jm1 = null;
JPanel contantPane = null;
JLabel label = null;
JMenuItem jmI = null;
JComboBox combobox_1;
JPanel Panele = null;
JMenuItem menuItem1 = null;
JMenuItem menuItem2 = null;
JMenuBar bar =null;
JMenu mF= null;
JMenu mH = null;
JMenu mI = null;
//Konstruktor Gui
public Main(){
fr = new JFrame("Coutinius Integration SS 2019");
fr.setSize(600,900);
fr.setSize(600,800);
fr.setFont(new Font("Helvetica", Font.PLAIN, 12));
fr.setLayout(new FlowLayout());
jmb = new JMenuBar();
fr.setJMenuBar(jmb);
jm = new JMenu("Menu");
jmb.add(jm);
jmI = new JMenuItem("Exit");
jm.add(jmI);
jmI.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ie) {
Panele = new JPanel();
System.exit(-1);
}
});
jm1 = new JMenu("Info");
jmb.add(jm1);
fr.setContentPane(Panele);
contantPane = new JPanel();
bar = new JMenuBar();
fr.setJMenuBar(bar);
mF = new JMenu("File");
mH = new JMenu("Help");
mI = new JMenu("Info");
bar.add(mF);
bar.add(mH);
bar.add(mI);
fr.setContentPane(contantPane);
menuItem1 = new JMenuItem("Exit"); mF.add(menuItem1);
menuItem2 = new JMenuItem("Über"); mI.add(menuItem2);
contantPane.add(new JLabel("Ein Tool der CI!"));
contantPane.add(new JLabel("Tools von Daniel, Eugen, Michael"));
menuItem2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ie) {
try {
JOptionPane.showMessageDialog(fr, "Tools entwickelt für CI 2019 Copyright by DEM Consulting");
ButtonGroup buttonGroup = new ButtonGroup();
}catch (Exception ex) {
JOptionPane.showMessageDialog(null, "Fehler");
}
fr.addWindowListener(new WindowAdapter() {
}
});
this.fr.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
System.exit(-1);
}
});
combobox_1 = new JComboBox();
combobox_1.addItem("Daniels Tools");
combobox_1.addItem("Eugen Tools");
combobox_1.addItem("Michaels Tools");
fr.add(combobox_1);
fr.setContentPane(Panele);
Panele.add(new JLabel("CI Tools von "));
JRadioButton DTools = new JRadioButton("Daniels Tools"); DTools.setBounds(100, 100, 100, 20);
buttonGroup.add(DTools); contantPane.add(DTools);
ButtonGroup buttonGroup = new ButtonGroup();
JButton DTools = new JButton("Daniel"); DTools.setBounds(100, 100, 100, 20);
buttonGroup.add(DTools); Panele.add(DTools);
JRadioButton ETools = new JRadioButton("Eugen Tools"); ETools.setBounds(200, 100, 100, 20);
buttonGroup.add(ETools); contantPane.add(ETools);
JButton ETools = new JButton("Eugen"); ETools.setBounds(200, 200, 100, 20);
buttonGroup.add(ETools); Panele.add(ETools);
JRadioButton MTools = new JRadioButton("Eugen Tools"); MTools.setBounds(300, 100, 100, 20);
buttonGroup.add(MTools); contantPane.add(MTools);
JButton MTools = new JButton("Michael"); MTools.setBounds(300, 300, 100, 20);
buttonGroup.add(MTools); Panele.add(MTools);
JLabel auswahl = new JLabel("Ihre Auswahl:");
auswahl.setBounds(10, 200, 100, 20);
contantPane.add(auswahl);
final JTextField text1 = new JTextField("..Bisher keine Auswahl!..");
text1.setBounds(100, 200, 300, 20);
contantPane.add(text1);
DTools.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ie) {
text1.setText("Daniel Tools");
try {
JOptionPane.showMessageDialog(fr, "Aufruf von Daniels Tools");
fr.setVisible(false);
Tage_D gb = new Tage_D();
}catch (Exception ex) {
JOptionPane.showMessageDialog(null, "Fehler beim Aufruf von Daniels Tools");
}
}
});
ETools.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ie) {
text1.setText("Eugens Tools");
try {
JOptionPane.showMessageDialog(fr, "Aufruf von Eugens Tools");
//fr.setVisible(false);
Quiz q = new Quiz();
}catch (Exception ex) {
JOptionPane.showMessageDialog(null, "Fehler beim Aufruf von Eugens Tools");
}
}
});
MTools.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ie) {
text1.setText("Michaels Tools");
try {
JOptionPane.showMessageDialog(fr, "Aufruf von Michaels Tools");
fr.setVisible(false);
Quiz q = new Quiz();
}catch (Exception ex) {
JOptionPane.showMessageDialog(null, "Fehler beim Aufruf von Michaels Tools");
}
});
}
});
contantPane.setVisible(true);
fr.setVisible(true);
fr.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Panele.setVisible(true);
this.fr.setVisible(true);
this.fr.setAlwaysOnTop(true);
this.fr.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
public static void main(String[] args) {
@ -104,12 +135,4 @@ public class Main {
}
}

87
src/Tage_D.java

@ -3,58 +3,76 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JOptionPane;
import javax.swing.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.util.concurrent.ThreadLocalRandom;
public class Tage_D extends JFrame {
JFrame fr = null;
JPanel Panele = null;
JButton button1 = null;
JLabel label1 = null;
JLabel label2 = null;
JLabel label3 = null;
JLabel label4 = null;
JLabel label5 = null;
JLabel label6 = null;
JLabel label7 = null;
JLabel label8 = null;
JLabel label9 = null;
JLabel labe20 = null;
JTextField j1 = null;
JTextField j2 = null;
JTextField j3 = null;
JTextField j4 = null;
JTextField j5 = null;
JMenuItem menuItem1 = null;
JMenuItem menuItem2 = null;
JOptionPane opane = null;
JMenuBar bar =null;
JMenu mF= null;
JMenu mH = null;
JMenu mI = null;
int button1warsovielmalgedrückt = 0;
public Tage_D() {
fr = new JFrame("GUI");
fr.setSize(350, 700);
fr = new JFrame("Coutinius Integration SS 2019");
fr.setSize(600,800);
fr.setFont(new Font("Helvetica", Font.PLAIN, 12));
fr.setLayout(new FlowLayout());
Panele = new JPanel();
fr.setContentPane(Panele);
bar = new JMenuBar();
fr.setJMenuBar(bar);
mF = new JMenu("File");
mH = new JMenu("Help");
mI = new JMenu("Info");
bar.add(mF);
bar.add(mH);
bar.add(mI);
menuItem1 = new JMenuItem("Exit"); mF.add(menuItem1);
menuItem2 = new JMenuItem("Info"); mH.add(menuItem2);
menuItem2 = new JMenuItem("Über"); mI.add(menuItem2);
menuItem2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ie) {
try {
JOptionPane.showMessageDialog(fr, "Tools entwickelt für CI 2019 Copyright by DEM Consulting");
}catch (Exception ex) {
JOptionPane.showMessageDialog(null, "Fehler");
}
}
});
j1 = new JTextField("Ein Tool der CI"); j1.setEditable(false); j1.setSize(450,30); ; Panele.add(j1);
j2 = new JTextField("Tools von Daniel Hauch"); j2.setEditable(false); Panele.add(j2); j2.setSize(450,30); Panele.add(j2);
j3 = new JTextField("Wie ist Ihr Name?"); j3.setEditable(true); Panele.add(j2); j3.setSize(450,30); Panele.add(j3);
this.fr.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(-1);
}
});
fr.setContentPane(Panele);
j1 = new JTextField("Tools von Daniel Hauch"); j1.setEditable(false); j1.setSize(450,30); ; Panele.add(j1);
j2 = new JTextField("Wie ist Ihr Name?"); j2.setEditable(false); Panele.add(j2); j2.setSize(450,30); Panele.add(j2);
j3 = new JTextField(""); j3.setEditable(true); Panele.add(j2); j3.setSize(450,30); Panele.add(j3);
button1 = new JButton("Erfahren"); Panele.add(button1);
@ -62,21 +80,21 @@ public class Tage_D extends JFrame {
ButtonGroup buttonGroup = new ButtonGroup();
JRadioButton hzeit = new JRadioButton("Hochzeit");
hzeit.setBounds(100, 170, 100, 20);
buttonGroup.add(hzeit); this.Panele.add(hzeit);
JRadioButton gtag = new JRadioButton("Geburtstag");
JButton szeit= new JButton("Sterbezeitpunkt");
szeit.setBounds(100, 170, 100, 20);
buttonGroup.add(szeit); Panele.add(szeit);
JButton gtag = new JButton("zufällige Alter ausrechnen");
gtag.setBounds(250, 170, 100, 20);
buttonGroup.add(gtag); this.Panele.add(gtag);
buttonGroup.add(gtag); Panele.add(gtag);
JLabel auswahl = new JLabel("Ihre Auswahl:");
auswahl.setBounds(10, 200, 100, 20);
this.Panele.add(auswahl);
final JTextField text1 = new JTextField();
Panele.add(auswahl);
final JTextField text1 = new JTextField("");
text1.setBounds(100, 200, 300, 20);
this.Panele.add(text1);
Panele.add(text1);
hzeit.addActionListener(new ActionListener() {
szeit.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ie) {
text1.setText("MALE");
}
@ -95,17 +113,12 @@ public class Tage_D extends JFrame {
}
});
this.fr.setVisible(true);
this.fr.setAlwaysOnTop(true);
}
public static void main(String[] args) {
Tage_D gb = new Tage_D();
fr.setVisible(true);
fr.setAlwaysOnTop(true);
fr.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}

0
src/bild.gif

0
src/pic.jpg

Loading…
Cancel
Save