Java tutorial
//package com.java2s; //License from project: Open Source License import java.awt.Component; public class Main { public static void disable(Component... components) { for (Component component : components) { component.setEnabled(false); } } }