• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

JSF and SWING components

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I came across the following article
http://www.roseindia.net/jsf/actionListener.shtml
Where it showing swing component ,JOptionPane.showMessageDialog(null,"Hi"), being rendered using JSF.
Is it possible to use Swing component with JSF ? If this is true, I guess we can have a lot more flexible components and rendered using JSF.
What is the down side of this ? can anybody throw some light?

Shaiju
 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

You shouldn't use swing components for web based applications. Swing is meant for developing window based(thik) client applications. Here in this article, JOptionPane is used just to demonstrate the flexibility of using JSF but you shouldn't use JFrames/JButtons etc to render on browser. JSF has it's own components library for web applications.

Hope it helps.
 
Saloon Keeper
Posts: 24214
167
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Shaiju. you're hurting yourself by not abiding by our naming requirements (http://www.javaranch.com/name.jsp). A lot of us don't bother to answer questions from until people fix their display names. In your case it's cost you at least 2 days.
 
Rancher
Posts: 43026
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Swing components are rendered on the server, not on the client. It only works in this case because the client and the server run on the same machine - which will not be the case in real life.

My recommendation is to ignore roseindia.net - it is full of bad code and bad practices.
 
Hang a left on main. Then read this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic