function flag = isJavaFigure
%ISJAVAFIGURE Returns true if figures are java figures.  
%   FLAG = isJavaFigure returns true if calling figure 
%   creates a Java figure; otherwise it returns false.
%  
%   See also IMAGEINFO, IPTTABLE.

%   Copyright 1993-2004 The MathWorks, Inc.
%   $Revision: 1.1.8.1 $  $Date: 2004/08/10 01:50:25 $
  
figHandle = figure('Visible','off');

if isempty(get(figHandle,'JavaFrame'))
  flag = false;
else
  flag = true;
end

close(figHandle)