Oberflächen
  Vorlesungen     Download     DBS     Sprachen     File Formats     Impressum     Datenschutz  
C#- GUI-Programme mit Quellcode
Java-Programme mit Quellcode
C#
WPF
HTML
Java FX
Java (Swing)
Winforms
Visual Studio (MFC)
ArcView
QGis
ArcView .net
IDW
Allgemein:
Startseite
Vorlesungen
Labore
Sinnvolle Programme
Lineare Regression
GUI-Entwurfsarbeit
Single-Format
Design Pattern-Termine
Observer1
Bsp2
Json-Array
Json-Dialogelemente
Webtechnologien

RadioButton

RadioButton

Beschreibung Download
Dialogfenster mit RadioButtons UIBspRadioButton01.java
UIBspRadioButton01.png

RadioButton rb1 = new RadioButton("RB1");
ToggleGroup group1 = new ToggleGroup(); // javafx.scene.control.ToggleButton

rb1.setToggleGroup(group1);
rb1.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent e) {
rb1();
}
});
Dialogfenster mit RadioButtons UIBspRadioButton02.java
UIBspRadioButton02.png

RadioButton rb5cm = new RadioButton("5 cm");
RadioButton rb10cm = new RadioButton("10 cm");
RadioButton rb15cm = new RadioButton("15 cm");
RadioButton rb20cm = new RadioButton("20 cm");
RadioButton rb25cm = new RadioButton("25 cm");
RadioButton[] listeRB2 = {rb5cm,rb10cm,rb15cm,rb20cm,rb25cm };

ToggleGroup group1 = new ToggleGroup();
for(int i=0; i<listeRB1.length; i++) {
RadioButton rb = listeRB1[i];
rb.setToggleGroup(group1);
rb.setFont(new Font("Courier New",22));
rb.setMaxWidth(Double.POSITIVE_INFINITY);
vbox1.getChildren().add(rb);
vbox1.setVgrow(rb, Priority.ALWAYS);
if (i==0)
vbox1.setMargin(rb, new Insets(10, 10, 0, 10)); // TRBL
else if (i==(listeRB1.length-1))
vbox1.setMargin(rb, new Insets(0, 10, 10, 10)); // TRBL
else
vbox1.setMargin(rb, new Insets(0, 10, 0, 10)); // TRBL
}



onClick-Snippet
Spinner