Java:How to align Jpanels

Posted by John on Stack Overflow See other posts from Stack Overflow or by John
Published on 2010-05-30T16:09:38Z Indexed on 2010/05/30 16:12 UTC
Read the original article Hit count: 117

Filed under:

I have this code but it doesn't work: jPanel1.add(jLabel1); jPanel2.add(jButton1); jPanel2.add(jButton2); jPanel3.add(jPanel1,jPanel1.TOP_ALIGNMENT); jPanel3.add(jPanel2,jPanel2.BOTTOM_ALIGNMENT); setContentPane(jPanel3);

    pack();

Please tell me why!

© Stack Overflow or respective owner

Related posts about java