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 ]
Jens Langer

Posts: 30
Registered: 3/21/07
javacomponent ( tab constructor )
Posted: Aug 15, 2011 5:35 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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!

I know the methods using "uitabgroup" and "uitab" as well as you should know that i want to avoid this method. I observed, that adding new tabs using the "uitab" command is very slow in deployed applications. It takes nearly a second to update the tabgroup. And that is really anoying.

Does anyone know how to deal with this problem using "directly" the underlaying javacomponent functions to create a fast and professional look and feel uitabgroup?



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

[Privacy Policy] [Terms of Use]

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