Benutzer-Werkzeuge

Webseiten-Werkzeuge


en:gui-usage

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
en:gui-usage [2016/07/20 15:36] – [JLabel] roehneren:gui-usage [2022/09/02 10:20] (aktuell) – Externe Bearbeitung 127.0.0.1
Zeile 7: Zeile 7:
  
 With the method setLocation(int x, int y) of a JLabel-component you can animate an image. With the method setLocation(int x, int y) of a JLabel-component you can animate an image.
-<html><img src="http://vg08.met.vgwort.de/na/0bcd12449ac147d08ba0529b6daeced2" width="1" height="1" alt=""><html>+<html><img src="http://vg08.met.vgwort.de/na/0bcd12449ac147d08ba0529b6daeced2" width="1" height="1" alt=""></html>
 \\ \\
 \\ \\
Zeile 74: Zeile 74:
 ---- ----
  
-==== JRadioButton & JButtonGroup ====+==== ButtonGroup ====
 {{:en:radiobuttonen.png}} {{:en:radiobuttonen.png}}
-JRadiobuttons offer different options, from which you can choose just one. +A Buttongroup groups Radiobuttons or CheckboxesSet the attribute Checkboxes to true if you want a group of CheckboxesEnter your options using the Items attribute. 
-To group the JRadioButtons you have to place an invisible ButtonGroup component {{:en:buttongroup.png}} on the form. +
-Write the name of this ButtonGroup for each JRadioButton as value of the attribute //ButtonGroup// in the object inspector.+
  
-The Java-Editor places this method into the java source code:+For a buttongroup of radiobuttons the Java-Editor places this method into the java source code:
  
-<code java>  public String buttonGroup1_getSelectedRadioButtonLabel() { ... }</code>+<code java>  public String buttonGroup1_getSelectedButtonGroupLabel() { ... }</code>
  
-so it's easy to get the selected JRadioButton of a ButtonGroup. Example:+so it's easy to get the selected JRadioButton of a Buttongroup. Example:
  
-<code java>  if (bgColor_getSelectedRadioButtonLabel().equals("green"))</code>+<code java>  if (bgColor_getSelectedButtonGroupLabel().equals("green"))</code>
 \\ \\
 ---- ----
Zeile 214: Zeile 212:
 If you minimize your Java-Application with a Canvas-component und show it up again, the content of the Canvas-Component is lost. To avoid this, you have to create a subclass from Canvas and do the drawing in the //paint(Graphics g)// method. Such a derived class can be placed in a GUI-form with right-click on the Canvas-Symbol. If you minimize your Java-Application with a Canvas-component und show it up again, the content of the Canvas-Component is lost. To avoid this, you have to create a subclass from Canvas and do the drawing in the //paint(Graphics g)// method. Such a derived class can be placed in a GUI-form with right-click on the Canvas-Symbol.
  
- 
-The turtle which belongs to the Java-Editor is an example of a Canvas-subclass.\\ 
 ---- ----
  
 ==== Turtle ==== ==== Turtle ====
 +{{:de:fxturtle.png}}
 +
 +Since Java-Editor version 14.04 we have an animated Turtle-component for JavaFX.
 +It's conception is based on the former Turtle-component and supports a cartesian coordinate system.
  
 {{:de:playgroundturtle.png}} {{:de:playgroundturtle.png}}
en/gui-usage.1469021791.txt.gz · Zuletzt geändert: 2016/07/20 15:36 (Externe Bearbeitung)