Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: add a uicontainer or uipanel to a JPanel
Date: Wed, 12 Sep 2007 23:49:07 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 31
Message-ID: <fc9ttj$eh5$1@fred.mathworks.com>
References: <f9fvpk$t63$1@fred.mathworks.com> <f9hcmr$dhk$1@fred.mathworks.com> <f9hibi$m7t$1@fred.mathworks.com> <f9hje3$62v$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 1189640947 14885 172.30.248.38 (12 Sep 2007 23:49:07 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 12 Sep 2007 23:49:07 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869439
Xref: news.mathworks.com comp.soft-sys.matlab:428222



"Andrew Watson" <andruwatson@yahoo.co.uk> wrote in message 
<f9hje3$62v$1@fred.mathworks.com>...
> Thanks Yair,
> 
> An axis is ultimately what I wanted to add to to a JPanel
> but I figured that a uicontanier or uipanel in which an 
axis
> can sit might be more native to the Java environment.  

The short answer to the posted question is you can't do 
that.

The uicontainers and uipanels and axes, for that matter, 
just can't be put in arbitrary Java components. It's not 
that we don't want to make it possible, it's just a ton of 
work and other priorities keep coming up.

As for putting an axes in a Java container, you can use the 
print or imwrite commands to dump the contents of a figure 
into a bitmap then shove that into any Java canvas which 
can show a bitmap.  We've done some hackery where you take 
the output from imwrite and stuff it onto a JButton for 
example.

As for putting non-bitmap axes into Java containers, could 
you tell me more about why you want to do it?  What is the 
MATLAB thing you can't do without this capability?

Thanks,

Bill