Java JFrame Parent getRootFrame(JComponent component)

Here you can find the source of getRootFrame(JComponent component)

Description

get Root Frame

License

Open Source License

Declaration

public static Frame getRootFrame(JComponent component) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.awt.Component;

import java.awt.Frame;

import javax.swing.JComponent;

public class Main {
    public static Frame getRootFrame(JComponent component) {
        Component c = component;//w ww  .ja v a 2  s  .  com
        while (!(c instanceof Frame))
            c = c.getParent();

        return ((Frame) c);
    }
}

Related

  1. getRealFrameParent(Component c)
  2. getRootFrame()
  3. getRootFrame(Component aComp)
  4. getRootFrame(Component c)
  5. getRootFrame(java.awt.Component c)
  6. getSpssInstallationDirectory(Frame parent)
  7. installOperation(final RootPaneContainer frame, final int condition, final KeyStroke keyStroke, final String actionKey, Action action)
  8. isFrameModified(RootPaneContainer frame)
  9. okToWriteFile(Frame parent, String fileName)