Java Utililty Methods JComponent Container

List of utility methods to do JComponent Container

Description

The list of methods to do JComponent Container are organized into topic(s).

Method

JRootPanerootPaneForComponent(Component comp)
root Pane For Component
for (Component p = comp; p != null; p = p.getParent()) {
    if (p instanceof JRootPane) {
        return (JRootPane) p;
    if (comp instanceof JFrame) {
        return ((JFrame) comp).getRootPane();
    if (comp instanceof JDialog) {
...
voidwidgetsEnable(boolean flag, JComponent... comps)
Enable/disable a group of JComponents widgets.
for (JComponent cmp : comps) {
    cmp.setEnabled(flag);