Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: javacomponent ( tab constructor )
Replies: 5   Last Post: Aug 21, 2011 9:24 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Steven Lord

Posts: 17,622
Registered: 12/7/04
Re: javacomponent ( tab constructor )
Posted: Aug 16, 2011 5:21 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply



"Jens" <alpha60@freenet.de> wrote in message
news:j2c3ee$4r0$1@newscl01ah.mathworks.com...
> Hello,
>
> i am trying to work with the "javacomponent" command creating a tabgroup
> with several panels on it. The code, which is not working seems like this:
>
> f=figure();
> [jTabbedPane, jTabbedPaneC] = javacomponent(javax.swing.JTabbedPane(),[0 0
> 400 400],f);
> [jPanel1,jPanel1C] = javacomponent(javax.swing.JPanel,[],jTabbedPaneC);
> [jPanel2,jPanel2C] = javacomponent(javax.swing.JPanel,[],jTabbedPaneC);
> [jPanel3,jPanel3C] = javacomponent(javax.swing.JPanel,[],jTabbedPaneC);
> [jLabel1,jLabel1C] = javacomponent(javax.swing.JLabel('Tab
> 1'),[],jPanel1C);
> [jLabel2,jLabel2C] = javacomponent(javax.swing.JLabel('Tab
> 2'),[],jPanel2C);
> [jLabel3,jLabel3C] = javacomponent(javax.swing.JLabel('Tab
> 3'),[],jPanel3C);
>
> button = uicontrol('style','pushbutton','parent',jPanel1C);
>
> jPanel1.add(jLabel1);
> jPanel2.add(jLabel2);
> jPanel3.add(jLabel3);
> jTabbedPane.add(jPanel1);
> jTabbedPane.add(jPanel2);
> jTabbedPane.add(jPanel3);
>
> It does not work at all and i really dont know why!


What do you mean by "does not work at all" -- does it throw a warning, does
it throw an error, does it close the figure window, does it crash MATLAB,
does it shut down your operating system, does it cause your computer to
burst into flames, etc.?

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2013. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.