Problem with Jpanel

Hi,

I use a Jpanel into my solution;I need it to make some particular scroll,so I use the Jpanel in wich I put a tabPanel(that contains my form).
With the smartClient all work fine but when I use the webclient an error is throwed:

“Can’t find method java.awt.Container.add(com.servoy.j2db.server.headlessclient.dataui.WebTabPanel,string,number)”

Maybe in the webClient servoy use another kind of object to instantiate the tabPanel ?

Can I make something to let it work?

Thanks in advance

Marco

Not exactly the Answer to your Question, but I think this could be handy for you to solve the Problem.
Happy Coding!

Jan

JPanel is a swing component. Same thing for java.awt.Container.
These are not used on the webclient which is a browser not a java application.

In the web client, the components are Wicket components, so you will have to use a Panel Wicket component subclass (a html div, basically, with wicket ‘behaviors’) which will be able to contain the equivalent Wicket tabpanel component. Not as easy as it sounds… because I can’t imagine how you could do that unless you build a bean with both implementations: Swing for the smart client, Wicket for the web client.

Have a look at my tutorials on how to build a bean for Servoy to see what I mean.

Thanks for your answer Patrik,

Maybe you don’t remember it but you have already help me when I was tring to use the JscrollPane :D
I had forgotten your tutorial,thanks,I go to take a look! :)

Marco

I remember, yes! :)

Just beware about Wicket components: building Wicket counterparts for Swing components is not the easiest thing to do…
The public API is here but there are a few shortcomings, and you will need to get a fairly good understanding of Wicket (fortunately it is Open Source and quite well documented) before even attempting to do what you want, and then after that you will need to understand the usage that Servoy has of Wicket… Another challenge, which hopefully, with the upcoming Servoy 5.2 availability of the sources, will be facilitated, if not easy.

Good luck,

:shock: :shock:

i missed to post the link to Patricks Tutorial :evil:

Thats what I wanted to do in my previous post…

Sorry!

I remember, yes!

Just beware about Wicket components: building Wicket counterparts for Swing components is not the easiest thing to do…
The public API is here but there are a few shortcomings, and you will need to get a fairly good understanding of Wicket (fortunately it is Open Source and quite well documented) before even attempting to do what you want, and then after that you will need to understand the usage that Servoy has of Wicket… Another challenge, which hopefully, with the upcoming Servoy 5.2 availability of the sources, will be facilitated, if not easy.

Good luck,

Thanks Patrick,if something isn’t easy is always interesting :D

i missed to post the link to Patricks Tutorial

Thats what I wanted to do in my previous post…

Sorry!

Thanks anyway :)