A Visual Guide to Layout Managers (The Java™ Tutorials > Creating a GUI With JFC/Swing > Laying Out Components Within a Container) Several AWT and Swing classes provide layout managers for general use: This section shows example GUIs that use these layout managers, and tells you where to find the how-to page for each layout manager.
You can find links for running the examples in the how-to pages and in the example index. Note: This lesson covers writing layout code by hand, which can be challenging. If you are not interested in learning all the details of layout management, you might prefer to use the GroupLayout layout manager combined with a builder tool to lay out your GUI. One such builder tool is the NetBeans IDE. Otherwise, if you want to code by hand and do not want to use GroupLayout, then GridBagLayout is recommended as the next most flexible and powerful layout manager. If you are interested in using JavaFX to create your GUI, see Working With Layouts in JavaFX. BorderLayout Every content pane is initialized to use a BorderLayout.
BoxLayout The BoxLayout class puts components in a single row or column. Trail: Creating a GUI With JFC/Swing (The Java™ Tutorials) Exceptions.pdf (Objet application/pdf) Fabien Torre: Jeux. Notes de cours sur les algorithmes de jeu : algorithmes Min-Max et Alpha-Beta, fonctions d'évaluation. Préliminaires L'application aux jeux a toujours été un domaine actif de l'Intelligence Artificielle. On s'intéresse ici aux jeux asynchrones opposant deux joueurs (chacun joue à son tour), à information complète (chacun sait tout de la situation de jeu, à chaque instant). Dans la suite, on note J1 et J2 les deux joueurs et l'on se place dans la situation c'est à J1 de jouer. Le déroulement de la partie peut être vu comme un arbre : On voit là un parallèle assez fort avec les graphes d'états : l'état initial est la situation actuelle, les états finaux sont les fins de partie et les opérateurs correspondent les coups légaux.
Algorithme Min-Max On prend la convention suivante : une situation gagnante pour J1 vaut +1 ; une situation perdante pour J1 vaut -1 ; une situation nulle vaut 0. On commence par développer l'arbre de jeu : et l'on conclut que le premier joueur doit enlever deux allumettes. JeuP.pdf (Objet application/pdf) Les méthodes de classe. Du C/C++ à Java : Table des matières.