From: <doc...@us...> - 2007-06-21 23:43:51
|
Revision: 95 http://openpcl.svn.sourceforge.net/openpcl/?rev=95&view=rev Author: documentsystems Date: 2007-06-21 16:43:48 -0700 (Thu, 21 Jun 2007) Log Message: ----------- Howard Hoagland. In the Printer Setup dialog, the OK button should be the same width at the Cancel button but wasn't the same width even setting the preferred size of the Ok button the same as the Cancel preferred size, so switched from the TableLayout preferred column width to the GridLayout(1,2,5,5) and that fixed the same widths of the 2 buttons. Modified Paths: -------------- openpcl/src/com/openpcl/viewer/printing/PosPrintSetupDialog.java Modified: openpcl/src/com/openpcl/viewer/printing/PosPrintSetupDialog.java =================================================================== --- openpcl/src/com/openpcl/viewer/printing/PosPrintSetupDialog.java 2007-06-21 23:10:44 UTC (rev 94) +++ openpcl/src/com/openpcl/viewer/printing/PosPrintSetupDialog.java 2007-06-21 23:43:48 UTC (rev 95) @@ -6,6 +6,7 @@ import java.awt.Color; import java.awt.Dimension; import java.awt.Font; +import java.awt.GridLayout; import java.awt.HeadlessException; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -533,15 +534,15 @@ private JPanel makeBottomButtonsPanel() { JPanel panel = new JPanel(); double tloGridSpec[][] = new double[][] {{ - mTloHgap, mTloFill, mTloPref, mTloHgap, mTloPref, mTloFill, mTloHgap}, { mTloPref }}; + mTloFill, mTloPref, mTloFill}, { mTloPref }}; TableLayout tloLayout = new TableLayout(tloGridSpec); panel.setLayout(tloLayout); // panel.add(mPrintAllOnLegalSizeJCheckBox, "0, 0"); // panel.add(mAdvancedOptionsJButton, "0, 0"); - mOKJButton.setPreferredSize(mCancelJButton.getPreferredSize()); // Make Ok button same width as Cancel button - mOKJButton.setMinimumSize(mCancelJButton.getPreferredSize()); - panel.add(mOKJButton, "2, 0"); - panel.add(mCancelJButton, "4, 0"); + JPanel tGridLayoutJPanel = new JPanel(new GridLayout(1, 2, 5, 5)); + tGridLayoutJPanel.add(mOKJButton, "0,0"); + tGridLayoutJPanel.add(mCancelJButton, "0,1"); + panel.add(tGridLayoutJPanel, "1, 0"); return panel; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |