[Commit] RRClient RRClient.java,1.13,1.14
Bart Massey
commit at keithp.com
Wed Jan 7 21:59:57 PST 2004
Committed by: bart
Update of /local/src/CVS/RRClient
In directory home.keithp.com:/tmp/cvs-serv25931
Modified Files:
RRClient.java
Log Message:
Finished layout fixes.
Index: RRClient.java
===================================================================
RCS file: /local/src/CVS/RRClient/RRClient.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- RRClient.java 8 Jan 2004 05:28:15 -0000 1.13
+++ RRClient.java 8 Jan 2004 05:59:55 -0000 1.14
@@ -44,7 +44,8 @@
bidBox.setEditable(true);
bidBox.setSelectedItem("");
/* bidBox.setMaximumRowCount(3); */
- bidBox.setMaximumSize(bidBox.getPreferredSize());
+ bidBox.setLightWeightPopupEnabled(false);
+ bidBox.setMaximumSize(bidBox.getMinimumSize());
class BidListener implements ActionListener {
public void actionPerformed(ActionEvent e) {
JComboBox b = (JComboBox) e.getSource();
@@ -59,10 +60,13 @@
bx.setBorder(border);
bx.add(bidBox);
- Box ctls = new Box(BoxLayout.Y_AXIS);
+ JPanel controlPanel = new JPanel();
+ controlPanel.setLayout(new BorderLayout());
- ctls.add(bx);
+ controlPanel.add(bx, BorderLayout.SOUTH);
+ Box buttonPanel = new Box(BoxLayout.Y_AXIS);
+
/* reset turn button */
class ResetListener implements ActionListener {
public void actionPerformed (ActionEvent e) {
@@ -74,7 +78,7 @@
Button resetButton = new Button ("Reset");
resetButton.addActionListener (reset_listener);
- ctls.add(resetButton);
+ buttonPanel.add(resetButton);
/* next turn button */
class NextListener implements ActionListener {
@@ -87,7 +91,7 @@
Button nextButton = new Button ("Next");
nextButton.addActionListener (next_listener);
- ctls.add(nextButton);
+ buttonPanel.add(nextButton);
/* Quit button */
class QuitListener implements ActionListener {
@@ -100,7 +104,7 @@
Button quitButton = new Button ("Quit");
quitButton.addActionListener (quit_listener);
- ctls.add(quitButton);
+ buttonPanel.add(quitButton);
/* Message Display */
ctl.messages = new RRMessages (10, 30);
@@ -131,11 +135,13 @@
f.getContentPane().add (mx, BorderLayout.SOUTH);
- //ctls.setMaximumSize(bx.getPreferredSize());
-
- ctls.add(Box.createGlue());
+ JPanel buttonPad = new JPanel();
+ buttonPad.setLayout(new BorderLayout());
+ buttonPad.add(buttonPanel, BorderLayout.NORTH);
- f.getContentPane().add(ctls, BorderLayout.EAST);
+ controlPanel.add(buttonPad, BorderLayout.NORTH);
+
+ f.getContentPane().add(controlPanel, BorderLayout.EAST);
f.setSize(new Dimension(596, 496));
f.setVisible(true);
More information about the Commit
mailing list