javax.swing.plaf.basic

Class BasicOptionPaneUI.ButtonActionListener

public class BasicOptionPaneUI.ButtonActionListener extends Object implements ActionListener

This is a helper class that listens to the buttons located at the bottom of the JOptionPane.

UNKNOWN: Apparently this class was intended to be protected, but was made public by a compiler bug and is now public for compatibility.

Field Summary
protected intbuttonIndex
The index of the option this button represents.
Constructor Summary
ButtonActionListener(int buttonIndex)
Creates a new ButtonActionListener object with the given buttonIndex.
Method Summary
voidactionPerformed(ActionEvent e)
This method is called when one of the option buttons are pressed.

Field Detail

buttonIndex

protected int buttonIndex
The index of the option this button represents.

Constructor Detail

ButtonActionListener

public ButtonActionListener(int buttonIndex)
Creates a new ButtonActionListener object with the given buttonIndex.

Parameters: buttonIndex The index of the option this button represents.

Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
This method is called when one of the option buttons are pressed.

Parameters: e The ActionEvent.