MotifOptionPaneUI.javaAPI DocJava SE 5 API2676Fri Aug 26 14:54:46 BST


public class MotifOptionPaneUI extends BasicOptionPaneUI
Provides the CDE/Motif look and feel for a JOptionPane.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

1.17 12/19/03
Scott Violet

Fields Summary
Constructors Summary
Methods Summary
protected voidaddIcon(java.awt.Container top)
Creates and adds a JLabel representing the icon returned from getIcon to top. This is messaged from createMessageArea

	/* Create the icon. */
	Icon                  sideIcon = getIcon();

	if (sideIcon != null) {
	    JLabel            iconLabel = new JLabel(sideIcon);

	    top.add(iconLabel, "West");
protected java.awt.ContainercreateButtonArea()
Creates and returns a Container containin the buttons. The buttons are created by calling getButtons.

	Container          b = super.createButtonArea();

	if(b != null && b.getLayout() instanceof ButtonAreaLayout) {
	return b;
protected java.awt.ContainercreateSeparator()

        return new JPanel() {

            public Dimension getPreferredSize() {
                return new Dimension(10, 2);

            public void paint(Graphics g) {
                int width = getWidth();
	        g.drawLine(0, 0, width, 0);
	        g.drawLine(0, 1, width, 1);
public static javax.swing.plaf.ComponentUIcreateUI(javax.swing.JComponent x)
Creates a new MotifOptionPaneUI instance.

	return new MotifOptionPaneUI();
public java.awt.DimensiongetMinimumOptionPaneSize()
Returns null, CDE/Motif does not impose a minimum size.

	return null;