Geen cache-versie.

Caching uitgeschakeld. Standaardinstelling voor deze pagina:ingeschakeld (code LNG204)
Als het scherm te langzaam is, kunt u de gebruikersmodus uitschakelen om de cacheversie te bekijken.
java.awt

Class CheckboxGroup

  • All Implemented Interfaces:
    Serializable

    public class CheckboxGroup
    extends Object
    implements Serializable
    The CheckboxGroup class is used to group together a set of Checkbox buttons.

    Exactly one check box button in a CheckboxGroup can be in the "on" state at any given time. Pushing any button sets its state to "on" and forces any other button that is in the "on" state into the "off" state.

    The following code example produces a new check box group, with three check boxes:

     setLayout(new GridLayout(3, 1));
     CheckboxGroup cbg = new CheckboxGroup();
     add(new Checkbox("one", cbg, true));
     add(new Checkbox("two", cbg, false));
     add(new Checkbox("three", cbg, false));
     

    This image depicts the check box group created by this example:

    Shows three checkboxes, arranged vertically, labeled one, two, and three. Checkbox one is in the on state.

    Since:
    JDK1.0
    See Also:
    Checkbox, Serialized Form
    • Constructor Detail

      • CheckboxGroup

        public CheckboxGroup()
        Creates a new instance of CheckboxGroup.
    • Method Detail

      • getSelectedCheckbox

        public Checkbox getSelectedCheckbox()
        Gets the current choice from this check box group. The current choice is the check box in this group that is currently in the "on" state, or null if all check boxes in the group are off.
        Returns:
        the check box that is currently in the "on" state, or null.
        Since:
        JDK1.1
        See Also:
        Checkbox, setSelectedCheckbox(java.awt.Checkbox)
      • getCurrent

        @Deprecated
        public Checkbox getCurrent()
        Deprecated. As of JDK version 1.1, replaced by getSelectedCheckbox().
      • setSelectedCheckbox

        public void setSelectedCheckbox(Checkbox box)
        Sets the currently selected check box in this group to be the specified check box. This method sets the state of that check box to "on" and sets all other check boxes in the group to be off.

        If the check box argument is null, all check boxes in this check box group are deselected. If the check box argument belongs to a different check box group, this method does nothing.

        Parameters:
        box - the Checkbox to set as the current selection.
        Since:
        JDK1.1
        See Also:
        Checkbox, getSelectedCheckbox()
      • setCurrent

        @Deprecated
        public void setCurrent(Checkbox box)
        Deprecated. As of JDK version 1.1, replaced by setSelectedCheckbox(Checkbox).
      • toString

        public String toString()
        Returns a string representation of this check box group, including the value of its current selection.
        Overrides:
        toString in class Object
        Returns:
        a string representation of this check box group.

Nederlandse vertaling

U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.

Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.

Bij voorbaat dank.

Document heeft de 11/06/2005 gemaakt, de laatste keer de 04/03/2020 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/java-api-rf-java/awt/checkboxgroup.html

De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.

Referenties

  1. Bekijk - html-document Taal van het document:fr Manuel PHP : https://docs.oracle.com

Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur Deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.

Inhoudsopgave Haut