2005-09-15 Lillian Angel <[EMAIL PROTECTED]> Fixes #23873 * javax/swing/plaf/basic/BasicOptionPaneUI.java (createMessageArea): Changed orientation of message from EAST to CENTER. Also, fixed empty border values to make message more centered. * javax/swing/JOptionPane.java (showConfirmDialog): Added check for pane.getValue, since clicking on 'x' of window does not have an initialized value. Was causing a ClassCastException. (showConfirmDialog): Likewise. (showConfirmDialog): Likewise. (showConfirmDialog): Likewise.
? .ChangeLog.swp Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.4793 diff -u -r1.4793 ChangeLog --- ChangeLog 15 Sep 2005 13:19:07 -0000 1.4793 +++ ChangeLog 15 Sep 2005 14:02:12 -0000 @@ -1,3 +1,17 @@ +2005-09-15 Lillian Angel <[EMAIL PROTECTED]> + + Fixes #23873 + * javax/swing/plaf/basic/BasicOptionPaneUI.java + (createMessageArea): Changed orientation of message from EAST to + CENTER. Also, fixed empty border values to make message more centered. + * javax/swing/JOptionPane.java + (showConfirmDialog): Added check for pane.getValue, since clicking on + 'x' of window does not have an initialized value. Was causing a + ClassCastException. + (showConfirmDialog): Likewise. + (showConfirmDialog): Likewise. + (showConfirmDialog): Likewise. + 2005-09-15 David Gilbert <[EMAIL PROTECTED]> * javax/swing/plaf/basic/BasicButtonUI.java Index: java/awt/BorderLayout.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/awt/BorderLayout.java,v retrieving revision 1.18 diff -u -r1.18 BorderLayout.java --- java/awt/BorderLayout.java 4 Aug 2005 18:10:44 -0000 1.18 +++ java/awt/BorderLayout.java 15 Sep 2005 14:02:13 -0000 @@ -423,6 +423,7 @@ */ public float getLayoutAlignmentX(Container parent) { + System.out.println(parent.getAlignmentX()); return(parent.getAlignmentX()); } Index: javax/swing/JOptionPane.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/JOptionPane.java,v retrieving revision 1.16 diff -u -r1.16 JOptionPane.java --- javax/swing/JOptionPane.java 13 Sep 2005 23:23:40 -0000 1.16 +++ javax/swing/JOptionPane.java 15 Sep 2005 14:02:13 -0000 @@ -863,8 +863,10 @@ dialog.pack(); dialog.show(); - - return ((Integer) pane.getValue()).intValue(); + + if (pane.getValue() instanceof Integer) + return ((Integer) pane.getValue()).intValue(); + return -1; } /** @@ -889,7 +891,9 @@ dialog.pack(); dialog.show(); - return ((Integer) pane.getValue()).intValue(); + if (pane.getValue() instanceof Integer) + return ((Integer) pane.getValue()).intValue(); + return -1; } /** @@ -915,7 +919,9 @@ dialog.pack(); dialog.show(); - return ((Integer) pane.getValue()).intValue(); + if (pane.getValue() instanceof Integer) + return ((Integer) pane.getValue()).intValue(); + return -1; } /** @@ -943,7 +949,9 @@ dialog.pack(); dialog.show(); - return ((Integer) pane.getValue()).intValue(); + if (pane.getValue() instanceof Integer) + return ((Integer) pane.getValue()).intValue(); + return -1; } /** Index: javax/swing/plaf/basic/BasicOptionPaneUI.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicOptionPaneUI.java,v retrieving revision 1.22 diff -u -r1.22 BasicOptionPaneUI.java --- javax/swing/plaf/basic/BasicOptionPaneUI.java 13 Sep 2005 23:23:41 -0000 1.22 +++ javax/swing/plaf/basic/BasicOptionPaneUI.java 15 Sep 2005 14:02:13 -0000 @@ -860,10 +860,10 @@ addIcon(messageArea); JPanel rightSide = new JPanel(); - rightSide.setBorder(BorderFactory.createEmptyBorder(0, 11, 17, 0)); + rightSide.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); rightSide.setLayout(new GridBagLayout()); GridBagConstraints con = createConstraints(); - + addMessageComponents(rightSide, con, getMessage(), getMaxCharactersPerLineCount(), false); @@ -886,7 +886,7 @@ } } - messageArea.add(rightSide, BorderLayout.EAST); + messageArea.add(rightSide, BorderLayout.CENTER); return messageArea; }
_______________________________________________ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches