home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Languages Suite
/
ProgLangD.iso
/
VCAFE.3.0A
/
Main.bin
/
GetFrame.java
< prev
next >
Wrap
Text File
|
1998-08-01
|
484b
|
22 lines
package com.symantec.itools.util;
import java.awt.*;
public class GetFrame {
/**
* Finds the frame that encloses an applet, or if one can't be found,
* creates a new frame.
*/
public static Frame find(Container container) {
Container theFrame = container;
do {
theFrame = theFrame.getParent();
} while ((theFrame != null) && !(theFrame instanceof Frame));
if (theFrame == null)
theFrame = new Frame();
return (Frame) theFrame;
}
}