View RSS Feed

Java Swing

Java Swing tutorials.

  1. Swing Action architecture

    by , 01-08-2012 at 12:28 PM
    Shared behavior between different user interfaces components are implemented by “Swing Action Architecture”. Like tool bar buttons and menu items perform same actions. All the components are disabled when an action is disabled.

    Java Code: Swing Action Architecture
    class FileAction extends AbstractAction {
    //Constructor
    FileAction(String name) {
    super(name);
    }
    public void actionPerformed(ActionEvent ae){
    //add action logic here
    }
    }
    JMenu fileMenu
    ...

    Updated 01-14-2012 at 06:56 PM by Java Swing

    Categories
    Architecture , Actions