private static Frame mostRecentFrame = null;
private Projects() { }
public static Frame getTopFrame() {
Frame ret = mostRecentFrame;
if (ret == null) {
Frame backup = null;
for (Project proj : openProjects) {
Frame frame = proj.getFrame();
if (ret == null) ret = frame;
if (ret.isVisible() && (ret.getExtendedState() & Frame.ICONIFIED) != 0) {
backup = ret;
}
}