public synchronized void setButtonAction6D(int button, int action) {
        if (! (action == TRANSLATE_FORWARD || action == TRANSLATE_BACKWARD ||
               action == GRAB_VIEW || action == ROTATE_CCW ||
	       action == ROTATE_CW || action == SCALE_UP ||
	       action == SCALE_DOWN || action == NONE))
            throw new IllegalArgumentException
                ("\naction must be TRANSLATE_FORWARD, TRANSLATE_BACKWARD, " +
                 "GRAB_VIEW, ROTATE_CCW, ROTATE_CW, SCALE_UP, SCALE_DOWN, " +
		 "or NONE") ;

        while (button >= buttonActions6D.size()) {
            buttonActions6D.add(null) ;
        }
        buttonActions6D.set(button, new Integer(action)) ;
    }