Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.awt.Component;
import java.awt.Container;

public class Main {
    public static void setRecursivelyEnabled(Component c, boolean b) {
        c.setEnabled(b);
        if (c instanceof Container) {
            for (Component child : ((Container) c).getComponents()) {
                setRecursivelyEnabled(child, b);
            }
        }
    }
}