Trying to sync the toolkit after printing.

This commit is contained in:
beard%netscape.com 1999-07-30 03:51:25 +00:00
Родитель 674889b1d4
Коммит 22fd32aa57
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -24,16 +24,23 @@ package netscape.oji;
import java.awt.Container;
import java.awt.Graphics;
import java.awt.Toolkit;
public class AWTUtils {
/**
* Prints the components of a specified Container.
*/
public static void printContainer(Container container, Object notifier) {
// print the specified container.
Graphics g = container.getGraphics();
g.drawString("AWTUtils.printContainer()", 0, 12);
container.print(g);
g.dispose();
// try to flush the graphics pipeline.
Toolkit tk = Toolkit.getDefaultToolkit();
tk.sync();
// if caller is waiting for this to complete, then notify.
if (notifier != null) {
synchronized(notifier) {