• Post Reply Bookmark Topic Watch Topic
  • New Topic

Swing Components in TLD

 
Naveen Mishra
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to use swing COmponents for creating custom Tag ?
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Naveen Mishra:
How to use swing COmponents for creating custom Tag ?


Couldn't really get you. What are you trying to achieve?
 
Naveen Mishra
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Adeel.
Thanks for ur response.

actually i intend to create my own tld which displays data in tree format.
though , i'm using tomhawk lib , but it seems clumsy to me.

kindly post some hints.

thanks
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24213
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't use Swing components in a JSP. When you're using JSP, all the Java code runs on the server, before the user ever sees the page. No Java runs on the client desktop. If you want a tree control on a web page, you need to use JavaScript, CSS, or a combination of the two.
 
Sri Anand
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure if this best solutions you can render an applet and you can display your Jtree and achieve the functionality , when ever your custom tag is used.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moreover, if you really intend to use swing then you can use it inside an applet. You applet would reside in your JSP page. For more you can search google with "Applet servlet communication".

But the suggestion given by Ernest is the right one, indeed. You had better use Javascript/CSS.

[Edited]
Raghunandan, you beat me by 1 minute. Anyways, welcome to Javaranch.
[ November 24, 2005: Message edited by: Adeel Ansari ]
 
Naveen Mishra
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot U all.
I think The Applet solution won't be feasible enough, though it may work for now and using javascript is something which , i would prefer as the last option, should be avoided as it makes the jsp very clumsy.

any ways, let me check and come back if the applet works this way .

Thanks.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!