File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSF and SWING components

 
Shaiju scientia
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
sammaiah kyatham
Ranch Hand
Posts: 104
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17646
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic