Skip to content
Snippets Groups Projects
Commit 62c0409b authored by PIQUEREZ Corentin's avatar PIQUEREZ Corentin
Browse files

position des boutons ok

parent cf13329d
No related branches found
No related tags found
No related merge requests found
10 11
230519 230520
10 11
230519 230520
...@@ -17,12 +17,12 @@ public class ShukanViewBar extends JPanel { ...@@ -17,12 +17,12 @@ public class ShukanViewBar extends JPanel {
/** Hauteur en pixels de la barre d'outils */ /** Hauteur en pixels de la barre d'outils */
private int height; private int height;
/** Barre contenant tous les boutons */ /** Barre contenant tous les boutons */
private JPanel fonct; private JPanel p_left, p_right;
/** Construit la barre d'outils */ /** Construit la barre d'outils */
public ShukanViewBar(int height) { public ShukanViewBar(int height) {
fonct = new JPanel(); p_left = new JPanel();
p_right = new JPanel();
this.height = height; this.height = height;
for (int i = 0; i < imagesName.length; i++) { for (int i = 0; i < imagesName.length; i++) {
...@@ -30,15 +30,20 @@ public class ShukanViewBar extends JPanel { ...@@ -30,15 +30,20 @@ public class ShukanViewBar extends JPanel {
buttons[i].setPreferredSize(new Dimension(85, 85)); buttons[i].setPreferredSize(new Dimension(85, 85));
buttons[i].setBackground(Color.WHITE); buttons[i].setBackground(Color.WHITE);
buttons[i].setBorder(new LineBorder(Color.WHITE)); buttons[i].setBorder(new LineBorder(Color.WHITE));
fonct.add(buttons[i]);
if (i<imagesName.length-2)
p_left.add(buttons[i]);
else
p_right.add(buttons[i]);
} }
// Définir la taille personnalisée pour la JPanel
fonct.setPreferredSize(new Dimension(300, height + 10)); p_left.setBackground(Color.WHITE);
fonct.setBackground(Color.WHITE); p_right.setBackground(Color.WHITE);
setLayout(new BorderLayout()); setLayout(new BorderLayout());
add(fonct, BorderLayout.CENTER); add(p_left, BorderLayout.WEST);
add(p_right, BorderLayout.EAST);
setBackground(Color.WHITE); setBackground(Color.WHITE);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment