POLITECHNIKA RZESZOWSKA - Wydział Elektrotechn*] i Informatyki
import j ava.awt.*; import j ava.awt.event.*; import javax.swing.*;
public class AbstractActionApplet extends JApplet {
JButton buttonl, button2; public void init() {
setLayout(new FlowLayout());
Action action = new AbstractAation("Open", new
ImageIcon("open.gif")) {
{
putValue(Action.SHORT_DESCRIPTION, "Open ToolTipText"); putValue(Action.MNEMONIC_KEY, new
Integer(java.awt.event.KeyEvent.VK_O));
)
public void actionPerformed(ActionEvent e) {
if (e.getSource() = buttonl) showStatus("Action:
Otwórz");
if (e.getSource() == button2) showStatus("Action:
)
U
S3Ż7T-
Copyright JU1J Jan HłUKW