Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: How to change a gui's figure icon
Date: Thu, 26 Jun 2008 15:46:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 27
Message-ID: <g40djq$419$1@fred.mathworks.com>
References: <g40c4u$h4b$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1214495162 4137 172.30.248.38 (26 Jun 2008 15:46:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 26 Jun 2008 15:46:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 939004
Xref: news.mathworks.com comp.soft-sys.matlab:476005



"Daniel " <anothermathgeek+matlab@gmail.com> wrote in
message <g40c4u$h4b$1@fred.mathworks.com>...
> I am writing a large multi-windowed GUI in MATLAB and I
> would like the window (figure) icon for each window to be
> different. 
> 
> What I mean when I say 'window icon' is the small picture
> just to the left of the window's title, and the image that
> shows up in the minimized version of the program on the
> Windows taskbar. 
> 
> I am familiar with adding icons to uibuttons, but do not
> know how to change this property of a figure.
> 
> Thanks!
> Daniel

warning('off','MATLAB:HandleGraphics:ObsoletedProperty:JavaFrame');
jframe=get(handles.fig,'javaframe');
jIcon=javax.swing.ImageIcon('C:\program
files\matlab\r2007b\icons\icon.gif');
jframe.setFigureIcon(jIcon);

(while supplies last)