jeudi 5 mars 2015

Content PAne / BorderLayout

Hi, kann mir einer erklären, für was die ganzen 0 -en in den Arrays ab Zeile 8 stehn? Und was es mit dem ContentPane auf sich hat? Finde gerade zu den Arrays keine Erklärung im Internet...








Java Code:






  1. setSize(350, 300);



  2. setLocationRelativeTo(null);



  3. setDefaultCloseOperation(JDialog .DISPOSE_ON_CLOSE);



  4. getContentPane().setLayout(new BorderLayout ());



  5. contentPanel.setBorder(new EmptyBorder (5, 5, 5, 5));



  6. getContentPane().add(contentPanel, BorderLayout .CENTER);



  7. GridBagLayout gbl_contentPanel = new GridBagLayout ();



  8. gbl_contentPanel.columnWidths = new int[] { 0, 0, 0, 0 };



  9. gbl_contentPanel.rowHeights = new int[] { 0, 0, 0, 0, 0, 0, 0 };



  10. gbl_contentPanel.columnWeights = new double[] { 0.0, 0.0, 1.0,



  11. Double .MIN_VALUE };



  12. gbl_contentPanel.rowWeights = new double[] { 1.0, 0.0, 0.0, 1.0, 0.0,



  13. 0.0, Double .MIN_VALUE };



  14. contentPanel.setLayout(gbl_contentPanel);










Content PAne / BorderLayout

0 commentaires:

Enregistrer un commentaire