Here you can find the source of getParentFrame(Frame[] parentFrames)
Parameter | Description |
---|---|
parentFrames | a parameter |
public static JFrame getParentFrame(Frame[] parentFrames)
//package com.java2s; //License from project: Apache License import java.awt.Frame; import javax.swing.JFrame; public class Main { /**// w w w . j a v a2 s . c om * Find first instance of a JFrame. In some cases there are instances of Window which will cause the dialog to fail. * * @param parentFrames * @return */ public static JFrame getParentFrame(Frame[] parentFrames) { for (Frame frame : parentFrames) { if (frame instanceof JFrame) { return (JFrame) frame; } } return null; } }