Compare commits
4 Commits
a64040170a
...
8d950c5704
Author | SHA1 | Date | |
---|---|---|---|
8d950c5704 | |||
|
cad9726d0d | ||
|
4c54ba5d4b | ||
|
1d523ed097 |
BIN
Medien/Bilder/info_I_tiny.png
Normal file
BIN
Medien/Bilder/info_I_tiny.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 469 B |
@ -7,9 +7,8 @@ public class Demo {
|
|||||||
// w.display();
|
// w.display();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
aufg gudWindow = new aufg("Mein Geilo GUI", 700, 420);
|
aufg gudWindow = new aufg("Mein Geniales GUI", 400, 340);
|
||||||
gudWindow.loadDesign();
|
gudWindow.loadDesign2();
|
||||||
gudWindow.display(true);
|
gudWindow.display(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,14 +31,57 @@ public class aufg {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void loadDesign2(){
|
||||||
|
addMenuBar();
|
||||||
|
addLabel("Von");
|
||||||
|
addLabeledTextField("Bahnhof/Haltestelle", false);
|
||||||
|
addImage("Medien/Bilder/info_I_tiny.png");
|
||||||
|
addLabel("Nach");
|
||||||
|
addLabeledTextField("Bahnhof/Haltestelle", false);
|
||||||
|
addButton("über");
|
||||||
|
addLabel("Hinfahrt");
|
||||||
|
addLabeledTextField("Datum", false);
|
||||||
|
addLabel("Rückfahrt");
|
||||||
|
addLabeledTextField("Uhrzeit", false);
|
||||||
|
// addDropdown(values = {"Abfahrt", "Ankunft"})
|
||||||
|
addLabeledTextField("Uhrzeit", false);
|
||||||
|
// addDropdown(values = {"Abfahrt", "Ankunft"})
|
||||||
|
addLabel("Angaben zur Preisberechnung");
|
||||||
|
addLabel("Reisende");
|
||||||
|
// addDropdown(values = {"1 Erwachsener", "1 Student"})
|
||||||
|
// addDropdown(values = {"Keine Ermäßigung", "20% Rabatt"})
|
||||||
|
// addDropDown(values = {"2. Klasse", "1. Klasse"})
|
||||||
|
addButton("Personen Hinzufügen");
|
||||||
|
addImage("Medien/Bilder/info_I_tiny.png");
|
||||||
|
addButton("Auslandspreise");
|
||||||
|
addImage("Medien/Bilder/info_I_tiny.png");
|
||||||
|
addLabel("Angaben zur Verbindung");
|
||||||
|
addLabel("Verkehrsmittel: ");
|
||||||
|
// addDropDown(values = {"Standartsuche", "Spezialsuche"})
|
||||||
|
addButton("Erweitert");
|
||||||
|
addImage("Medien/Bilder/info_I_tiny.png");
|
||||||
|
// addCheckBox(label = "schnelle Verbindung bevorzugen")
|
||||||
|
addImage("Medien/Bilder/info_I_tiny.png");
|
||||||
|
// addCheckBox(label = "Fahrradmitnahme")
|
||||||
|
addButton("Verbindung Suchen");
|
||||||
|
addButton("Neue Anfrage");
|
||||||
|
addButton("Mein Anfrageprofil");
|
||||||
|
}
|
||||||
|
|
||||||
public void loadDesign(){
|
public void loadDesign(){
|
||||||
addMenuBar();
|
addMenuBar();
|
||||||
addLabeledTextField("TextBox", true);
|
addLabeledTextField("TextBox", true);
|
||||||
addLabeledPasswordField("Password", true);
|
addLabeledPasswordField("Password", true);
|
||||||
addImage("Medien/Bilder/info_I.png");
|
addImage("Medien/Bilder/info_I_tiny.png");
|
||||||
addImage("Medien/Bilder/HackerUnicorn_Schäbig.png");
|
addImage("Medien/Bilder/HackerUnicorn_Schäbig.png");
|
||||||
addLabeledRadioButtons("First Set of radiobuttons", new String[] {"Option1", "Choice2", "Variant3"}, true);
|
addLabeledRadioButtons("First Set of radiobuttons", new String[] {"Option1", "Choice2", "Variant3"}, true);
|
||||||
addLabeledRadioButtons("Second Group of Options", new String[] {"Maybe this?", "Or that"}, true);
|
addLabeledRadioButtons("Second Group of Options", new String[] {"Maybe this?", "Or that"}, true);
|
||||||
|
// popUpInputText(new String[] {"Choice1", "Option2"});
|
||||||
|
popUpDropDown("Medien/Bilder/info_I_tiny.png",
|
||||||
|
"Title of my Window",
|
||||||
|
"choose your favourite",
|
||||||
|
new String[] {"Choice1", "Option2"},
|
||||||
|
"Option2");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addMenuBar(){
|
public void addMenuBar(){
|
||||||
@ -162,6 +205,13 @@ public class aufg {
|
|||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void addButton(String text){
|
||||||
|
this.contentPane.add(makeButton(text));
|
||||||
|
}
|
||||||
|
public JButton makeButton(String text){
|
||||||
|
return new JButton(text);
|
||||||
|
}
|
||||||
|
|
||||||
public void addLabeledRadioButtons(String label, String[] options, boolean makeVertical){
|
public void addLabeledRadioButtons(String label, String[] options, boolean makeVertical){
|
||||||
this.contentPane.add(makeLabeledRadioButtons(label, options, makeVertical));
|
this.contentPane.add(makeLabeledRadioButtons(label, options, makeVertical));
|
||||||
}
|
}
|
||||||
@ -178,4 +228,19 @@ public class aufg {
|
|||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String popUpInputText(String[] values){
|
||||||
|
return (String) JOptionPane.showInputDialog(this.contentPane, values);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String popUpDropDown(String iconLink, String title, String message, String[] values, String initialSelection){
|
||||||
|
return (String) JOptionPane.showInputDialog(
|
||||||
|
this.contentPane,
|
||||||
|
message,
|
||||||
|
title,
|
||||||
|
JOptionPane.INFORMATION_MESSAGE,
|
||||||
|
new ImageIcon(iconLink),
|
||||||
|
values,
|
||||||
|
initialSelection);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user