Bonjour,

J'ai un problème avec un composant qui ne s'affiche pas à l'endroit désiré dans un JPanel. Voilà un bout du code :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
 
			_globalConceptJPanel = new JPanel();
			_globalConceptJPanel.setLayout(new FlowLayout());
			_globalConceptJPanel.setBackground(Color.BLUE);
 
			JPanel panel = new JPanel();
			panel.setLayout(new GridBagLayout());
			GridBagConstraints c = new GridBagConstraints();
			c.gridx = 0;
			....
 
			_globalConceptJPanel.add(panel);
Le problème est que le JPanel bleu _globalConceptJPanel contient bien le JPanel panel mais que ce dernier, panel apparaît en haut et centré de manière horizontale alors que je voufrais qu'il apparaisse en haut à gauche (d'où le FlowLayout).

Si quelqu'un voit comment corriger mon problème d'affichage, n'hésitez pas à le faire savoir ? J'ai testé pas mal de Layout différents, rien y fait...

Merci