combine Swing Actions - Java Swing

Java examples for Swing:Action

Description

combine Swing Actions

Demo Code


//package com.java2s;
import javax.swing.Action;

public class Main {
    public static Action[] combineActions(Action[] act1, Action[] act2) {
        Action[] newAct = new Action[act1.length + act2.length];
        for (int i = 0; i < act1.length; i++) {
            newAct[i] = act1[i];/*from   ww  w. jav  a 2s  .  c o m*/
        }
        for (int i = 0; i < act2.length; i++) {
            newAct[i + act1.length] = act2[i];
        }
        return newAct;

    }
}

Related Tutorials