-
Bug
-
Resolution: Fixed
-
P4
-
1.2.0, 1.2.2
-
beta
-
generic, sparc
-
generic, solaris_2.6
Name: dbT83986 Date: 01/12/99
The Motif versions of the standard JOptionPane dialogs are not using
enough horizontal padding around the button row. This is easily
seen when comparing a JOptionPane message dialog with a native
message dialog running under the CDE window manager.
When using a showConfirmDialog you can see that the default border
ring is almost touching(~3 pixels away) the window manager frame.
The same button configuration for a native CDE dialog has about
a 13 pixel gap.
Please spend a little time looking at the layout distances, both
horizontal and vertical, used in the CDE message dialogs to find
out how you should be doing the same to the standard dialogs.
Here's the code you can use to easily bring up a Motif version
of the showConfirmDialog:
//~~~~~~~~~~~~~~~~~~~~~~ cut here ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
class msgbox extends JFrame {
public static void main (String args[]) {
try {
UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");
} catch (Exception e) {e.printStackTrace();}
String msg = "Are you really sure you want to do that?";
JOptionPane.showConfirmDialog(new msgbox(), msg, "Confirm", JOptionPane.YES_NO_OPTION);
System.exit(0);
}
}
(Review ID: 52504)
======================================================================
- duplicates
-
JDK-4248198 Motif L&F of JOptionPane using incorrect spacing below button row
-
- Closed
-