From: Otmar H. <otm...@us...> - 2006-03-20 21:50:05
|
Update of /cvsroot/jython/installer/src/java/org/python/util/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11840/src/java/org/python/util/install Modified Files: DirectorySelectionPage.java Log Message: use grid bag layout Index: DirectorySelectionPage.java =================================================================== RCS file: /cvsroot/jython/installer/src/java/org/python/util/install/DirectorySelectionPage.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DirectorySelectionPage.java 7 Nov 2005 23:39:07 -0000 1.1 --- DirectorySelectionPage.java 20 Mar 2006 21:49:59 -0000 1.2 *************** *** 1,4 **** --- 1,6 ---- package org.python.util.install; + import java.awt.GridBagConstraints; + import java.awt.GridBagLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; *************** *** 12,15 **** --- 14,18 ---- import javax.swing.JFileChooser; import javax.swing.JLabel; + import javax.swing.JPanel; import javax.swing.JTextField; *************** *** 29,41 **** // label _label = new JLabel(); - add(_label); // directory ! _directory = new JTextField(30); _directory.addFocusListener(new DirectoryFocusListener()); - add(_directory); // browse button _browse = new JButton(); _browse.addActionListener(new BrowseButtonListener()); ! add(_browse); } --- 32,57 ---- // label _label = new JLabel(); // directory ! _directory = new JTextField(40); _directory.addFocusListener(new DirectoryFocusListener()); // browse button _browse = new JButton(); _browse.addActionListener(new BrowseButtonListener()); ! ! JPanel panel = new JPanel(); ! GridBagLayout gridBagLayout = new GridBagLayout(); ! panel.setLayout(gridBagLayout); ! GridBagConstraints gridBagConstraints = newGridBagConstraints(); ! gridBagConstraints.gridx = 0; ! gridBagConstraints.gridy = 0; ! panel.add(_label, gridBagConstraints); ! gridBagConstraints.gridx = 0; ! gridBagConstraints.gridy = 1; ! panel.add(_directory, gridBagConstraints); ! gridBagConstraints.gridx = 1; ! gridBagConstraints.gridy = 1; ! panel.add(_browse, gridBagConstraints); ! ! add(panel); } |