Plan :
9. Les bases de la programmation événementielle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 Exercice 100. Écouteurs de clics d’une fenêtre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 Exercice 101. Écouteurs de clics de plusieurs fenêtres . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 Exercice 102. Écouteur commun à plusieurs fenêtres . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 Exercice 103. Création de boutons et choix d’un gestionnaire FlowLayout . . . . . . . . . . . . . . . . . . . . 152 Exercice 104. Gestion de plusieurs boutons d’une fenêtre avec un seul écouteur . . . . . . . . . . . . . . . 154 Exercice 105. Synthèse : création et suppression de boutons (1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 Exercice 106. Synthèse : création et suppression de boutons (2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 Exercice 107. Dessin permanent dans une fenêtre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 Exercice 108. Synthèse : dessin permanent et changement de couleur . . . . . . . . . . . . . . . . . . . . . . . 164 Exercice 109. Synthèse : dessin permanent, coloration et adaptation à la taille d’une fenêtre . . . . . . 166 Exercice 110. Dessin à la volée . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 Exercice 111. Synthèse : ardoise magique en couleur . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 10. Les principaux contrôles de Swing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 Exercice 112. Cases à cocher . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174 Exercice 113. Cases à cocher en nombre quelconque . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 Exercice 114. Boutons radio en nombre quelconque . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 Exercice 115. Champs de texte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 Exercice 116. Champ de texte et événements Action et Focus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 Exercice 117. Écoute permanente d’un champ de texte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 Exercice 118. Synthèse : série harmonique . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 Exercice 119. Gestion d’une boîte de liste . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 Exercice 120. Synthèse : pendule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 11. Les boîtes de dialogue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 Exercice 121. Utilisation de boîtes de message et de confirmation . . . . . . . . . . . . . . . . . . . . . . . . . . 196 Exercice 122. Utilisation de boîtes de message, de confirmation et de saisie . . . . . . . . . . . . . . . . . . 197 Exercice 123. Programmation d’une boîte de message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 Exercice 124. Programmation d’une boîte de confirmation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202 Exercice 125. Programmation d’une boîte de saisie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204 Exercice 126. Synthèse : saisie d’une heure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206Si vous suivez des cours d'algorithme informatique, ce cours est fait pour vous, vous y trouverez un ensemble d'exercices corrigés, pour vous entraînez ...
Crée un compte gratuit pour télécharger ce document
Je m'inscrisOUJ'ai déjà un compte
Je me connecte