I am trying to use some java gui in my matlab code. 
I want to create a Jpanel containing lots of buttons , and add this Jpanel to a JscrollPane to be able to scroll up and down, right and left through the Jpanel. 
I tried using JavaComponent() function as described in : <http://undocumentedmatlab.com/blog/javacomponent> 

here is my code:

```
[jpanel1, hpanel1] = javacomponent('javax.swing.JPanel');
[jButton1, hButton1] = javacomponent('javax.swing.JButton');
[jscroll, hscroll] = javacomponent('javax.swing.JScrollPane');

jButton1.setText('Click again!'); 
set(hButton1,'position',[5 5 50 50])
set(hpanel1,'position',[50 50 500 500],'BackgroundColor','white');
jpanel1.add(jButton1);
jscroll.add(jpanel1);

```

The panel and button are created but I can't find the scrollpane, tried setting the jscroll to visible with no results.
WHat am I missing out??