<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154285</link>
    <title>MATLAB Central Newsreader - add a uicontainer or uipanel to a JPanel</title>
    <description>Feed for thread: add a uicontainer or uipanel to a JPanel</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Thu, 09 Aug 2007 21:09:08 -0400</pubDate>
      <title>add a uicontainer or uipanel to a JPanel</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154285#387106</link>
      <author>Andrew Watson</author>
      <description>I would like to add either a uipanel or uicontainer that has&lt;br&gt;
MATLAB graphics children to a JPanel.  After an evening of&lt;br&gt;
playing around with this but to no avail I thought I'd open&lt;br&gt;
it up to a wider audience.  Any suggestions would be very&lt;br&gt;
much appreciated.&lt;br&gt;
&lt;br&gt;
Thanks in advance&lt;br&gt;
&lt;br&gt;
Andrew</description>
    </item>
    <item>
      <pubDate>Fri, 10 Aug 2007 09:55:39 -0400</pubDate>
      <title>Re: add a uicontainer or uipanel to a JPanel</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154285#387173</link>
      <author>Arwel Hughes</author>
      <description>Hi Andrew,&lt;br&gt;
I've tried this too but got nowhere. It really does look &lt;br&gt;
like the matlab graphics are in some sort of Java &lt;br&gt;
containers (you can see this by running Yair Altman's find &lt;br&gt;
Obj &lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/matlabcentral/fileexchange/loadFile&quot;&gt;http://www.mathworks.com/matlabcentral/fileexchange/loadFile&lt;/a&gt;&lt;br&gt;
.do?objectId=14317&amp;objectType=file)&lt;br&gt;
But they seem to be weird Mathworks wrappers for the java &lt;br&gt;
objects rather than the 'real' thing. My hope was that I &lt;br&gt;
could plot a Matlab graph (hidden), and then just grab the &lt;br&gt;
relevant content pane and put that in a java frame. But I &lt;br&gt;
got nowhere unfortunately. &lt;br&gt;
I'm currently resorting to doing all the plotting in Java &lt;br&gt;
(using JFreeChart), which isn't quite as nice.&lt;br&gt;
If you do find out how to do this, it would be very useful &lt;br&gt;
for lots of people I think.&lt;br&gt;
Cheers&lt;br&gt;
Arwel &lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&quot;Andrew Watson&quot; &amp;lt;andruwatson@yahoo.co.uk&amp;gt; wrote in message &lt;br&gt;
&amp;lt;f9fvpk$t63$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; I would like to add either a uipanel or uicontainer that &lt;br&gt;
has&lt;br&gt;
&amp;gt; MATLAB graphics children to a JPanel.  After an evening of&lt;br&gt;
&amp;gt; playing around with this but to no avail I thought I'd &lt;br&gt;
open&lt;br&gt;
&amp;gt; it up to a wider audience.  Any suggestions would be very&lt;br&gt;
&amp;gt; much appreciated.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks in advance&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Andrew</description>
    </item>
    <item>
      <pubDate>Fri, 10 Aug 2007 11:32:02 -0400</pubDate>
      <title>Re: add a uicontainer or uipanel to a JPanel</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154285#387189</link>
      <author>Yair Altman</author>
      <description>&quot;Arwel Hughes&quot; &amp;lt;a.v.hughes@rl.ac.uk&amp;gt; wrote in message&lt;br&gt;
&amp;lt;f9hcmr$dhk$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; I've tried this too but got nowhere. It really does look &lt;br&gt;
&amp;gt; like the matlab graphics are in some sort of Java&lt;br&gt;
containers...&lt;br&gt;
&lt;br&gt;
That's my experience too. I, and several others, have&lt;br&gt;
asked/pleaded/begged MathWorks to enable Matlab components&lt;br&gt;
(most importantly an axis) to be added to a Java container&lt;br&gt;
(there are other Matlab/Java integration issues, but this is&lt;br&gt;
topmost). We hit a blank wall - MathWorks simply does not&lt;br&gt;
want to do this for reasons which were undisclosed. The&lt;br&gt;
official answer is that this is currently unsupported and&lt;br&gt;
will be added to the list of possible future enhancements&lt;br&gt;
and have a nice day... &lt;br&gt;
&lt;br&gt;
Yair Altman&lt;br&gt;
&lt;a href=&quot;http://ymasoftware.com&quot;&gt;http://ymasoftware.com&lt;/a&gt;</description>
    </item>
    <item>
      <pubDate>Fri, 10 Aug 2007 11:45:34 -0400</pubDate>
      <title>Re: add a uicontainer or uipanel to a JPanel</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154285#387192</link>
      <author>Andrew Watson</author>
      <description>Hi Arwel,&lt;br&gt;
&lt;br&gt;
I thought as much.  I saw your original posting and Yair&lt;br&gt;
Altman's comments and was hoping to do something similar. &lt;br&gt;
I'm sure this must be possible but it's starting to feel&lt;br&gt;
akin to banging my head against a brick wall.&lt;br&gt;
&lt;br&gt;
Going down the Java route for plotting isn't something I&lt;br&gt;
really want to do as MATLAB is so good at this.  I'm just&lt;br&gt;
disappointed that I will have to resort to creating a&lt;br&gt;
&quot;second class&quot; GUI.&lt;br&gt;
&lt;br&gt;
Thank you very much for your reply and I agree that this&lt;br&gt;
would be very useful to a lot of people.&lt;br&gt;
&lt;br&gt;
Kind Regards&lt;br&gt;
&lt;br&gt;
Andrew&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&quot;Arwel Hughes&quot; &amp;lt;a.v.hughes@rl.ac.uk&amp;gt; wrote in message&lt;br&gt;
&amp;lt;f9hcmr$dhk$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi Andrew,&lt;br&gt;
&amp;gt; I've tried this too but got nowhere. It really does look &lt;br&gt;
&amp;gt; like the matlab graphics are in some sort of Java &lt;br&gt;
&amp;gt; containers (you can see this by running Yair Altman's find &lt;br&gt;
&amp;gt; Obj &lt;br&gt;
&amp;gt; &lt;a href=&quot;http://www.mathworks.com/matlabcentral/fileexchange/loadFile&quot;&gt;http://www.mathworks.com/matlabcentral/fileexchange/loadFile&lt;/a&gt;&lt;br&gt;
&amp;gt; .do?objectId=14317&amp;objectType=file)&lt;br&gt;
&amp;gt; But they seem to be weird Mathworks wrappers for the java &lt;br&gt;
&amp;gt; objects rather than the 'real' thing. My hope was that I &lt;br&gt;
&amp;gt; could plot a Matlab graph (hidden), and then just grab the &lt;br&gt;
&amp;gt; relevant content pane and put that in a java frame. But I &lt;br&gt;
&amp;gt; got nowhere unfortunately. &lt;br&gt;
&amp;gt; I'm currently resorting to doing all the plotting in Java &lt;br&gt;
&amp;gt; (using JFreeChart), which isn't quite as nice.&lt;br&gt;
&amp;gt; If you do find out how to do this, it would be very useful &lt;br&gt;
&amp;gt; for lots of people I think.&lt;br&gt;
&amp;gt; Cheers&lt;br&gt;
&amp;gt; Arwel &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &quot;Andrew Watson&quot; &amp;lt;andruwatson@yahoo.co.uk&amp;gt; wrote in message &lt;br&gt;
&amp;gt; &amp;lt;f9fvpk$t63$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; I would like to add either a uipanel or uicontainer that &lt;br&gt;
&amp;gt; has&lt;br&gt;
&amp;gt; &amp;gt; MATLAB graphics children to a JPanel.  After an evening of&lt;br&gt;
&amp;gt; &amp;gt; playing around with this but to no avail I thought I'd &lt;br&gt;
&amp;gt; open&lt;br&gt;
&amp;gt; &amp;gt; it up to a wider audience.  Any suggestions would be very&lt;br&gt;
&amp;gt; &amp;gt; much appreciated.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Thanks in advance&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Andrew&lt;br&gt;
&amp;gt; </description>
    </item>
    <item>
      <pubDate>Fri, 10 Aug 2007 11:50:27 -0400</pubDate>
      <title>Re: add a uicontainer or uipanel to a JPanel</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154285#387193</link>
      <author>Andrew Watson</author>
      <description>Thanks Yair,&lt;br&gt;
&lt;br&gt;
An axis is ultimately what I wanted to add to to a JPanel&lt;br&gt;
but I figured that a uicontanier or uipanel in which an axis&lt;br&gt;
can sit might be more native to the Java environment.  &lt;br&gt;
&lt;br&gt;
Thanks for the response and all the matlab/java functions on&lt;br&gt;
FEX.&lt;br&gt;
&lt;br&gt;
Kind Regards&lt;br&gt;
&lt;br&gt;
Andrew Watson&lt;br&gt;
&lt;br&gt;
&quot;Yair Altman&quot; &amp;lt;altmanyDEL@gmailDEL.comDEL&amp;gt; wrote in message&lt;br&gt;
&amp;lt;f9hibi$m7t$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Arwel Hughes&quot; &amp;lt;a.v.hughes@rl.ac.uk&amp;gt; wrote in message&lt;br&gt;
&amp;gt; &amp;lt;f9hcmr$dhk$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; I've tried this too but got nowhere. It really does look &lt;br&gt;
&amp;gt; &amp;gt; like the matlab graphics are in some sort of Java&lt;br&gt;
&amp;gt; containers...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; That's my experience too. I, and several others, have&lt;br&gt;
&amp;gt; asked/pleaded/begged MathWorks to enable Matlab components&lt;br&gt;
&amp;gt; (most importantly an axis) to be added to a Java container&lt;br&gt;
&amp;gt; (there are other Matlab/Java integration issues, but this is&lt;br&gt;
&amp;gt; topmost). We hit a blank wall - MathWorks simply does not&lt;br&gt;
&amp;gt; want to do this for reasons which were undisclosed. The&lt;br&gt;
&amp;gt; official answer is that this is currently unsupported and&lt;br&gt;
&amp;gt; will be added to the list of possible future enhancements&lt;br&gt;
&amp;gt; and have a nice day... &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Yair Altman&lt;br&gt;
&amp;gt; &lt;a href=&quot;http://ymasoftware.com&quot;&gt;http://ymasoftware.com&lt;/a&gt;&lt;br&gt;
&amp;gt; </description>
    </item>
    <item>
      <pubDate>Wed, 12 Sep 2007 23:49:07 -0400</pubDate>
      <title>Re: add a uicontainer or uipanel to a JPanel</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154285#392002</link>
      <author>Bill York</author>
      <description>&quot;Andrew Watson&quot; &amp;lt;andruwatson@yahoo.co.uk&amp;gt; wrote in message &lt;br&gt;
&amp;lt;f9hje3$62v$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Thanks Yair,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; An axis is ultimately what I wanted to add to to a JPanel&lt;br&gt;
&amp;gt; but I figured that a uicontanier or uipanel in which an &lt;br&gt;
axis&lt;br&gt;
&amp;gt; can sit might be more native to the Java environment.  &lt;br&gt;
&lt;br&gt;
The short answer to the posted question is you can't do &lt;br&gt;
that.&lt;br&gt;
&lt;br&gt;
The uicontainers and uipanels and axes, for that matter, &lt;br&gt;
just can't be put in arbitrary Java components. It's not &lt;br&gt;
that we don't want to make it possible, it's just a ton of &lt;br&gt;
work and other priorities keep coming up.&lt;br&gt;
&lt;br&gt;
As for putting an axes in a Java container, you can use the &lt;br&gt;
print or imwrite commands to dump the contents of a figure &lt;br&gt;
into a bitmap then shove that into any Java canvas which &lt;br&gt;
can show a bitmap.  We've done some hackery where you take &lt;br&gt;
the output from imwrite and stuff it onto a JButton for &lt;br&gt;
example.&lt;br&gt;
&lt;br&gt;
As for putting non-bitmap axes into Java containers, could &lt;br&gt;
you tell me more about why you want to do it?  What is the &lt;br&gt;
MATLAB thing you can't do without this capability?&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
&lt;br&gt;
Bill</description>
    </item>
    <item>
      <pubDate>Sat, 15 Sep 2007 18:36:56 -0400</pubDate>
      <title>Re: add a uicontainer or uipanel to a JPanel</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154285#392448</link>
      <author>Yair Altman</author>
      <description>&quot;Bill York&quot; &amp;lt;BillDotYork@MathWorks.com&amp;gt; wrote in message&lt;br&gt;
&amp;lt;fc9ttj$eh5$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Andrew Watson&quot; &amp;lt;andruwatson@yahoo.co.uk&amp;gt; wrote in message &lt;br&gt;
&amp;gt; &amp;lt;f9hje3$62v$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Thanks Yair,&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; An axis is ultimately what I wanted to add to to a JPanel&lt;br&gt;
&amp;gt; &amp;gt; but I figured that a uicontanier or uipanel in which an &lt;br&gt;
&amp;gt; axis&lt;br&gt;
&amp;gt; &amp;gt; can sit might be more native to the Java environment.  &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; The short answer to the posted question is you can't do &lt;br&gt;
&amp;gt; that.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; The uicontainers and uipanels and axes, for that matter, &lt;br&gt;
&amp;gt; just can't be put in arbitrary Java components. It's not &lt;br&gt;
&amp;gt; that we don't want to make it possible, it's just a ton of &lt;br&gt;
&amp;gt; work and other priorities keep coming up.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; As for putting an axes in a Java container, you can use the &lt;br&gt;
&amp;gt; print or imwrite commands to dump the contents of a figure &lt;br&gt;
&amp;gt; into a bitmap then shove that into any Java canvas which &lt;br&gt;
&amp;gt; can show a bitmap.  We've done some hackery where you take &lt;br&gt;
&amp;gt; the output from imwrite and stuff it onto a JButton for &lt;br&gt;
&amp;gt; example.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; As for putting non-bitmap axes into Java containers, could &lt;br&gt;
&amp;gt; you tell me more about why you want to do it?  What is the &lt;br&gt;
&amp;gt; MATLAB thing you can't do without this capability?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Bill&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Thanks a lot for your comment Bill. It is sometimes&lt;br&gt;
important to place Matlab axes in Java containers, since&lt;br&gt;
Java (Swing in particular) enables richer GUI than Matlab&lt;br&gt;
enables. For example, if I need JSplitPane functionality I&lt;br&gt;
have to rely on Java, not Matlab, but then I cannot add a&lt;br&gt;
Matlab axes to either side of the split-pane, which is a&lt;br&gt;
major drawback. You'll agree with me, I hope, that&lt;br&gt;
reprogramming a JSplitPane from scratch in Matlab just to&lt;br&gt;
solve the axes issue would be a shameful waste...&lt;br&gt;
&lt;br&gt;
Remember that Matlab axes (&amp; children) are rich objects&lt;br&gt;
themselves, and simple imwrite falls far short of the needs&lt;br&gt;
(callbacks and online data updates are just two examples).&lt;br&gt;
&lt;br&gt;
If only an axes could be placed within a JContainer, that&lt;br&gt;
would automatically solve all these issues, for all Swing&lt;br&gt;
components.&lt;br&gt;
&lt;br&gt;
Yair Altman</description>
    </item>
    <item>
      <pubDate>Mon, 17 Sep 2007 09:46:46 -0400</pubDate>
      <title>Re: add a uicontainer or uipanel to a JPanel</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154285#392624</link>
      <author>Andrew Watson</author>
      <description>&quot;Yair Altman&quot; &amp;lt;altmanyDEL@gmailDEL.comDEL&amp;gt; wrote in message&lt;br&gt;
&amp;lt;fch8o8$ee7$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Bill York&quot; &amp;lt;BillDotYork@MathWorks.com&amp;gt; wrote in message&lt;br&gt;
&amp;gt; &amp;lt;fc9ttj$eh5$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &quot;Andrew Watson&quot; &amp;lt;andruwatson@yahoo.co.uk&amp;gt; wrote in message &lt;br&gt;
&amp;gt; &amp;gt; &amp;lt;f9hje3$62v$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Thanks Yair,&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; An axis is ultimately what I wanted to add to to a JPanel&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; but I figured that a uicontanier or uipanel in which an &lt;br&gt;
&amp;gt; &amp;gt; axis&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; can sit might be more native to the Java environment.  &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; The short answer to the posted question is you can't do &lt;br&gt;
&amp;gt; &amp;gt; that.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; The uicontainers and uipanels and axes, for that matter, &lt;br&gt;
&amp;gt; &amp;gt; just can't be put in arbitrary Java components. It's not &lt;br&gt;
&amp;gt; &amp;gt; that we don't want to make it possible, it's just a ton of &lt;br&gt;
&amp;gt; &amp;gt; work and other priorities keep coming up.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; As for putting an axes in a Java container, you can use the &lt;br&gt;
&amp;gt; &amp;gt; print or imwrite commands to dump the contents of a figure &lt;br&gt;
&amp;gt; &amp;gt; into a bitmap then shove that into any Java canvas which &lt;br&gt;
&amp;gt; &amp;gt; can show a bitmap.  We've done some hackery where you take &lt;br&gt;
&amp;gt; &amp;gt; the output from imwrite and stuff it onto a JButton for &lt;br&gt;
&amp;gt; &amp;gt; example.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; As for putting non-bitmap axes into Java containers, could &lt;br&gt;
&amp;gt; &amp;gt; you tell me more about why you want to do it?  What is the &lt;br&gt;
&amp;gt; &amp;gt; MATLAB thing you can't do without this capability?&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Thanks,&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Bill&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks a lot for your comment Bill. It is sometimes&lt;br&gt;
&amp;gt; important to place Matlab axes in Java containers, since&lt;br&gt;
&amp;gt; Java (Swing in particular) enables richer GUI than Matlab&lt;br&gt;
&amp;gt; enables. For example, if I need JSplitPane functionality I&lt;br&gt;
&amp;gt; have to rely on Java, not Matlab, but then I cannot add a&lt;br&gt;
&amp;gt; Matlab axes to either side of the split-pane, which is a&lt;br&gt;
&amp;gt; major drawback. You'll agree with me, I hope, that&lt;br&gt;
&amp;gt; reprogramming a JSplitPane from scratch in Matlab just to&lt;br&gt;
&amp;gt; solve the axes issue would be a shameful waste...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Remember that Matlab axes (&amp; children) are rich objects&lt;br&gt;
&amp;gt; themselves, and simple imwrite falls far short of the needs&lt;br&gt;
&amp;gt; (callbacks and online data updates are just two examples).&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; If only an axes could be placed within a JContainer, that&lt;br&gt;
&amp;gt; would automatically solve all these issues, for all Swing&lt;br&gt;
&amp;gt; components.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Yair Altman&lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
Bill,&lt;br&gt;
&lt;br&gt;
At the time of posting I was looking for the same&lt;br&gt;
functionality that Yair Altman has mentioned, that of a&lt;br&gt;
JSplitPane.  It is not a trivial exercise to code one up&lt;br&gt;
from scratch.  Also the results will never be as robust,&lt;br&gt;
fluid or aesthetically pleasing as a JSplitPane.&lt;br&gt;
&lt;br&gt;
Thanks for your suggestion of using imwrite or some other&lt;br&gt;
such method but as Yair has pointed out, I also want to&lt;br&gt;
maintain the functionality of an axis object i.e callbacks&lt;br&gt;
and what not.&lt;br&gt;
&lt;br&gt;
Andrew</description>
    </item>
    <item>
      <pubDate>Tue, 27 Nov 2007 07:52:25 -0500</pubDate>
      <title>Re: add a uicontainer or uipanel to a JPanel</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154285#403288</link>
      <author>Amir </author>
      <description>&quot;Andrew Watson&quot; &amp;lt;andruwatson@yahoo.co.uk&amp;gt; wrote in message&lt;br&gt;
&amp;lt;fclie6$q6i$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Yair Altman&quot; &amp;lt;altmanyDEL@gmailDEL.comDEL&amp;gt; wrote in message&lt;br&gt;
&amp;gt; &amp;lt;fch8o8$ee7$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &quot;Bill York&quot; &amp;lt;BillDotYork@MathWorks.com&amp;gt; wrote in message&lt;br&gt;
&amp;gt; &amp;gt; &amp;lt;fc9ttj$eh5$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &quot;Andrew Watson&quot; &amp;lt;andruwatson@yahoo.co.uk&amp;gt; wrote in&lt;br&gt;
message &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;lt;f9hje3$62v$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; Thanks Yair,&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; An axis is ultimately what I wanted to add to to a&lt;br&gt;
JPanel&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; but I figured that a uicontanier or uipanel in which an &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; axis&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; can sit might be more native to the Java environment.  &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; The short answer to the posted question is you can't do &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; that.&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; The uicontainers and uipanels and axes, for that matter, &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; just can't be put in arbitrary Java components. It's not &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; that we don't want to make it possible, it's just a&lt;br&gt;
ton of &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; work and other priorities keep coming up.&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; As for putting an axes in a Java container, you can&lt;br&gt;
use the &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; print or imwrite commands to dump the contents of a&lt;br&gt;
figure &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; into a bitmap then shove that into any Java canvas which &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; can show a bitmap.  We've done some hackery where you&lt;br&gt;
take &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; the output from imwrite and stuff it onto a JButton for &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; example.&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; As for putting non-bitmap axes into Java containers,&lt;br&gt;
could &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; you tell me more about why you want to do it?  What is&lt;br&gt;
the &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; MATLAB thing you can't do without this capability?&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Thanks,&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Bill&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Thanks a lot for your comment Bill. It is sometimes&lt;br&gt;
&amp;gt; &amp;gt; important to place Matlab axes in Java containers, since&lt;br&gt;
&amp;gt; &amp;gt; Java (Swing in particular) enables richer GUI than Matlab&lt;br&gt;
&amp;gt; &amp;gt; enables. For example, if I need JSplitPane functionality I&lt;br&gt;
&amp;gt; &amp;gt; have to rely on Java, not Matlab, but then I cannot add a&lt;br&gt;
&amp;gt; &amp;gt; Matlab axes to either side of the split-pane, which is a&lt;br&gt;
&amp;gt; &amp;gt; major drawback. You'll agree with me, I hope, that&lt;br&gt;
&amp;gt; &amp;gt; reprogramming a JSplitPane from scratch in Matlab just to&lt;br&gt;
&amp;gt; &amp;gt; solve the axes issue would be a shameful waste...&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Remember that Matlab axes (&amp; children) are rich objects&lt;br&gt;
&amp;gt; &amp;gt; themselves, and simple imwrite falls far short of the needs&lt;br&gt;
&amp;gt; &amp;gt; (callbacks and online data updates are just two examples).&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; If only an axes could be placed within a JContainer, that&lt;br&gt;
&amp;gt; &amp;gt; would automatically solve all these issues, for all Swing&lt;br&gt;
&amp;gt; &amp;gt; components.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Yair Altman&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Bill,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; At the time of posting I was looking for the same&lt;br&gt;
&amp;gt; functionality that Yair Altman has mentioned, that of a&lt;br&gt;
&amp;gt; JSplitPane.  It is not a trivial exercise to code one up&lt;br&gt;
&amp;gt; from scratch.  Also the results will never be as robust,&lt;br&gt;
&amp;gt; fluid or aesthetically pleasing as a JSplitPane.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks for your suggestion of using imwrite or some other&lt;br&gt;
&amp;gt; such method but as Yair has pointed out, I also want to&lt;br&gt;
&amp;gt; maintain the functionality of an axis object i.e callbacks&lt;br&gt;
&amp;gt; and what not.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Andrew&lt;br&gt;
&amp;gt; &lt;br&gt;
Bill, &lt;br&gt;
&lt;br&gt;
As you know from our past correspondence, there are ways (at&lt;br&gt;
least two I'm aware of) to make a java/matlab figure hybrid &lt;br&gt;
that have java GUI and matlab graphic (aka &quot;the holly&lt;br&gt;
grail&quot;). However, both are non-trivial, non-intuitive, have&lt;br&gt;
limitations (for example, making sure the java components&lt;br&gt;
resize after the user resize the matlab figure) and require&lt;br&gt;
heavy usage of undocumented features. Moreover, it seems&lt;br&gt;
that new Matlab version frequently break such hacks that&lt;br&gt;
worked in the previous version (no real complains here, as&lt;br&gt;
those hacks use UNDOCUMENTED features). However, one gets&lt;br&gt;
tired from using those hacks and want to just implement the&lt;br&gt;
needed business logic instead of fighting with Java/Matlab&lt;br&gt;
integration issues.&lt;br&gt;
&lt;br&gt;
Can you comment on when (if at all) will Mathwork be able to&lt;br&gt;
implement a java wrapper around matlab axis that extends&lt;br&gt;
java.com.Component, so we could just drop it inside our&lt;br&gt;
favorite java container as god intended and go on with our&lt;br&gt;
lives.  &lt;br&gt;
&lt;br&gt;
Amir</description>
    </item>
    <item>
      <pubDate>Mon, 23 Feb 2009 18:14:02 -0500</pubDate>
      <title>Re: add a uicontainer or uipanel to a JPanel</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154285#630274</link>
      <author>Yair Altman</author>
      <description>&quot;Amir &quot; &amp;lt;amir_ben-dor.nospam@nospam.agilent.com&amp;gt; wrote in message &amp;lt;figibp$3tn$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Andrew Watson&quot; &amp;lt;andruwatson@yahoo.co.uk&amp;gt; wrote in message&lt;br&gt;
&amp;gt; &amp;lt;fclie6$q6i$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &quot;Yair Altman&quot; &amp;lt;altmanyDEL@gmailDEL.comDEL&amp;gt; wrote in message&lt;br&gt;
&amp;gt; &amp;gt; &amp;lt;fch8o8$ee7$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &quot;Bill York&quot; &amp;lt;BillDotYork@MathWorks.com&amp;gt; wrote in message&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;lt;fc9ttj$eh5$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &quot;Andrew Watson&quot; &amp;lt;andruwatson@yahoo.co.uk&amp;gt; wrote in&lt;br&gt;
&amp;gt; message &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;lt;f9hje3$62v$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; Thanks Yair,&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; An axis is ultimately what I wanted to add to to a&lt;br&gt;
&amp;gt; JPanel&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; but I figured that a uicontanier or uipanel in which an &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; axis&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; can sit might be more native to the Java environment.  &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; The short answer to the posted question is you can't do &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; that.&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; The uicontainers and uipanels and axes, for that matter, &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; just can't be put in arbitrary Java components. It's not &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; that we don't want to make it possible, it's just a&lt;br&gt;
&amp;gt; ton of &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; work and other priorities keep coming up.&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; As for putting an axes in a Java container, you can&lt;br&gt;
&amp;gt; use the &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; print or imwrite commands to dump the contents of a&lt;br&gt;
&amp;gt; figure &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; into a bitmap then shove that into any Java canvas which &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; can show a bitmap.  We've done some hackery where you&lt;br&gt;
&amp;gt; take &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; the output from imwrite and stuff it onto a JButton for &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; example.&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; As for putting non-bitmap axes into Java containers,&lt;br&gt;
&amp;gt; could &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; you tell me more about why you want to do it?  What is&lt;br&gt;
&amp;gt; the &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; MATLAB thing you can't do without this capability?&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; Thanks,&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; Bill&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Thanks a lot for your comment Bill. It is sometimes&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; important to place Matlab axes in Java containers, since&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Java (Swing in particular) enables richer GUI than Matlab&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; enables. For example, if I need JSplitPane functionality I&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; have to rely on Java, not Matlab, but then I cannot add a&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Matlab axes to either side of the split-pane, which is a&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; major drawback. You'll agree with me, I hope, that&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; reprogramming a JSplitPane from scratch in Matlab just to&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; solve the axes issue would be a shameful waste...&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Remember that Matlab axes (&amp; children) are rich objects&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; themselves, and simple imwrite falls far short of the needs&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; (callbacks and online data updates are just two examples).&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; If only an axes could be placed within a JContainer, that&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; would automatically solve all these issues, for all Swing&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; components.&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Yair Altman&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Bill,&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; At the time of posting I was looking for the same&lt;br&gt;
&amp;gt; &amp;gt; functionality that Yair Altman has mentioned, that of a&lt;br&gt;
&amp;gt; &amp;gt; JSplitPane.  It is not a trivial exercise to code one up&lt;br&gt;
&amp;gt; &amp;gt; from scratch.  Also the results will never be as robust,&lt;br&gt;
&amp;gt; &amp;gt; fluid or aesthetically pleasing as a JSplitPane.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Thanks for your suggestion of using imwrite or some other&lt;br&gt;
&amp;gt; &amp;gt; such method but as Yair has pointed out, I also want to&lt;br&gt;
&amp;gt; &amp;gt; maintain the functionality of an axis object i.e callbacks&lt;br&gt;
&amp;gt; &amp;gt; and what not.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Andrew&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; Bill, &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; As you know from our past correspondence, there are ways (at&lt;br&gt;
&amp;gt; least two I'm aware of) to make a java/matlab figure hybrid &lt;br&gt;
&amp;gt; that have java GUI and matlab graphic (aka &quot;the holly&lt;br&gt;
&amp;gt; grail&quot;). However, both are non-trivial, non-intuitive, have&lt;br&gt;
&amp;gt; limitations (for example, making sure the java components&lt;br&gt;
&amp;gt; resize after the user resize the matlab figure) and require&lt;br&gt;
&amp;gt; heavy usage of undocumented features. Moreover, it seems&lt;br&gt;
&amp;gt; that new Matlab version frequently break such hacks that&lt;br&gt;
&amp;gt; worked in the previous version (no real complains here, as&lt;br&gt;
&amp;gt; those hacks use UNDOCUMENTED features). However, one gets&lt;br&gt;
&amp;gt; tired from using those hacks and want to just implement the&lt;br&gt;
&amp;gt; needed business logic instead of fighting with Java/Matlab&lt;br&gt;
&amp;gt; integration issues.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Can you comment on when (if at all) will Mathwork be able to&lt;br&gt;
&amp;gt; implement a java wrapper around matlab axis that extends&lt;br&gt;
&amp;gt; java.com.Component, so we could just drop it inside our&lt;br&gt;
&amp;gt; favorite java container as god intended and go on with our&lt;br&gt;
&amp;gt; lives.  &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Amir&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
For those interested, I've just uploaded a new contribution to the File Exchange called UISplitPane (&lt;a href=&quot;http://www.mathworks.com/matlabcentral/fileexchange/23073),&quot;&gt;http://www.mathworks.com/matlabcentral/fileexchange/23073),&lt;/a&gt; which mimics JSplitPane behavior with full Matlab support. This means that you can add axes and controls to the split-panes (2 uipanels), and they resize automatically when the split-pane divider is moved interactively or programatically. Feedback is most welcome.&lt;br&gt;
&lt;br&gt;
Behind the scenes, the basis is much as Amir has hinted, and similar to the uitab/uitabgroup implementation: I've taken the divider portion of the JSplitPane and coupled it to 2 standard Matlab uipanels as sub-panes. Matlab axes and controls can now easily be added to the uipanels. Property listeners and schema property set-function setup then ensure consistency between the Java and Matlab parts. Special handling was added to ensure usability even in non-Java-enabled Matlabs (e.g., Matlab 6.0 aka R12).&lt;br&gt;
&lt;br&gt;
I assume this alleviates a major need in Matlab-Java integration but the basic request from all responders in this thread remains unchanged, quoting Amir: *PLEASE* &quot;implement a java wrapper around matlab axis that extends java.com.Component, so we could just drop it inside our favorite java container as god intended&quot;&lt;br&gt;
&lt;br&gt;
Yair Altman</description>
    </item>
  </channel>
</rss>

