

public static void main(String[] args) { JFrame frame = new JFrame("exemple"); JLabel label1 = new JLabel("texte1"); JLabel label2 = new JLabel("texte2"); JLabel cl = new JLabel("Credit Limité"); JButton button1 = new JButton("1"); JButton button2 = new JButton("2"); JButton button3 = new JButton("3"); JButton button4 = new JButton("4"); JButton button5 = new JButton("5"); JButton button6 = new JButton("6"); JButton button7 = new JButton("7"); JButton button8 = new JButton("8"); JButton button9 = new JButton("9"); JButton buttonan = new JButton("ANNUL."); JButton button0 = new JButton("0"); JButton buttonval = new JButton("VALID."); JPanel pane1 = new JPanel(new BorderLayout()); /* on peut spécifier le layout à la construction */ JPanel pane2 = new JPanel(new BorderLayout()); JPanel pane3 = new JPanel(new BorderLayout()); JPanel pane4 = new JPanel(new BorderLayout()); pane2.setLayout(new GridLayout(4,3)); pane1.add(pane2); pane2.add(cl, BorderLayout.WEST); pane2.add(pane3, BorderLayout.CENTER); pane2.add(button1); pane2.add(button2); pane2.add(button3); pane2.add(button4); pane2.add(button5); pane2.add(button6); pane2.add(button7); pane2.add(button8); pane2.add(button9); pane2.add(buttonan); pane2.add(button0); pane2.add(buttonval); /*pane2.add(pane3, BorderLayout.CENTER); pane3.add(button4, BorderLayout.EAST); pane3.add(button5, BorderLayout.WEST); pane3.add(label2, BorderLayout.CENTER);*/ frame.getContentPane().add(pane1, BorderLayout.CENTER); frame.setSize(400, 400); frame.setVisible(true); }
Lionel Debroux (./5) :
Va t'occuper de TIGCC, toi, plutôt que de faire le représentant d'un troisième groupe de trolls :P
Nil (./10) :
eval("print post[1]; print post[2]; print post[3]; print post[4]; print post[5]; print post[6]; print post[7]; print post[8]; print post[9]; print post[10]; print post[11]; print post[12]; print post[13]; print post[14]; print post[15]; print post[16]; print post[17]; print post[18]; print post[19]; print post[20]; print post[21]; print post[22]; print post[23]; print post[24]; print post[25]; print post[26]; print post[27]; print post[28]; print post[29]; print post[30]; print post[31]; print post[32]; print post[33]; print post[34]; print post[35]; print post[36]; print post[37]; print post[38]; print post[39]; print post[40]; print post[41]; print post[42]; print post[43]; print post[44]; print post[45]; print post[46]; print post[47]; print post[48]; print post[49]; print post[50]; print post[51]; print post[52];")
Pollux (./14) :Nil (./10) :
eval("print post[1]; print post[2]; print post[3]; print post[4]; print post[5]; print post[6]; print post[7]; print post[8]; print post[9]; print post[10]; print post[11]; print post[12]; print post[13]; print post[14]; print post[15]; print post[16]; print post[17]; print post[18]; print post[19]; print post[20]; print post[21]; print post[22]; print post[23]; print post[24]; print post[25]; print post[26]; print post[27]; print post[28]; print post[29]; print post[30]; print post[31]; print post[32]; print post[33]; print post[34]; print post[35]; print post[36]; print post[37]; print post[38]; print post[39]; print post[40]; print post[41]; print post[42]; print post[43]; print post[44]; print post[45]; print post[46]; print post[47]; print post[48]; print post[49]; print post[50]; print post[51]; print post[52];")
tu trouves ?
Godzil (./11) :Euh le débat au départ portait sur Swing, pas sur Java.
Sans compter que .net comme le propose vince, ok ça a un rapport, mais QT ? heu bref quoi, QT n'a vraiment aucun rapport avec Java et .Net
Nil (./10) :
Ah ouais mais bon, t'écris comme un porc aussi x_x
Pollux (./14) :Nil (./10) :
eval("print post[1]; print post[2]; print post[3]; print post[4]; print post[5]; print post[6]; print post[7]; print post[8]; print post[9]; print post[10]; print post[11]; print post[12]; print post[13]; print post[14]; print post[15]; print post[16]; print post[17]; print post[18]; print post[19]; print post[20]; print post[21]; print post[22]; print post[23]; print post[24]; print post[25]; print post[26]; print post[27]; print post[28]; print post[29]; print post[30]; print post[31]; print post[32]; print post[33]; print post[34]; print post[35]; print post[36]; print post[37]; print post[38]; print post[39]; print post[40]; print post[41]; print post[42]; print post[43]; print post[44]; print post[45]; print post[46]; print post[47]; print post[48]; print post[49]; print post[50]; print post[51]; print post[52];")
tu trouves ?![]()
Godzil (./11) :
Sans compter que .net comme le propose vince, ok ça a un rapport, mais QT ? heu bref quoi, QT n'a vraiment aucun rapport avec Java et .Net
Yoshi Noir (./1) :Ce n'est absolument pas moisi mais il faut faire l'effort de compréhension minimum sur le fonctionnement des layout.
Quel est le CON qui a inventé le Java Swing ?Entre la syntaxe complètement moisie et la construction des JPanel qui défie toute logique, y'a de quoi se tirer des plombs...
![]()
Kevin Kofler (./4) :De toute façon Qt et Swing on au final un fonctionnement assez proche. Donc ce énième troll ne me parait vraiment pas opportun.
Swing sux, Qt rulez!
Yoshi Noir (./9) :Le comportement est tout à fait normal, si tu expliquais exactement ce que tu voulais je pourrais t'aider à le corriger.
oh bah juge par toi-même :
Pen^2 (./20) :
les noms var1...varN et tout mettre en flat comme ça, ça n'aide pas à la compréhension
Nil (./8) :Perso, je fais ça en une ligne.
Sinon ça fait longtemps que je n'ai pas fait de Java (JDK 1.2), mais faut toujours 100 lignes pour avoir une fenêtre et trois boutons en swing ?![]()
Uther (./23) :
De toute façon Qt et Swing on au final un fonctionnement assez proche.