|
|
Re: javacomponent ( tab constructor )
Posted:
Aug 16, 2011 5:21 PM
|
|
"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
|
|