This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Servlets and the fly likes Why can't I use swing? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Why can Watch "Why can New topic

Why can't I use swing?

Tom Caldwell
Ranch Hand

Joined: Oct 09, 2000
Posts: 39
Perhaps this is a dumb question as I've never done anything with swing yet. BUT, if I have the swing .jar files that are installed with websphere and I have database servlet that starts from and then displays its results in html,
Why can't I use swing to spice this up a little?
I have read the other posts but I still don't see why
Thanks !!

Joined: Jun 14, 2001
Posts: 16
servlets write html to your browser. html has nothing to do with swing. html is not java.
if you want to put swing on a web page, you have to use applets. applets have nothing to do with servlets, so you can use any web server to serve applets.
Tom Caldwell
Ranch Hand

Joined: Oct 09, 2000
Posts: 39
Thanks John, and I guess I should read up on it 1st but thats the area I'm not clear about with swing.
OK my servlet does produce normal html and within this html I have one those applet scrollers with info about the servlet and some links. Its all just displaying on the browswer?? It seems like I could be able to work swing in there somehow?
and how did I get to be a ranch hand? Is that a numer of posts thing?
Aleksey Matiychenko
Ranch Hand

Joined: Apr 03, 2001
Posts: 178
You could use swing in the applet but you need to install a Java plugin for your browser that you can download from sun.

Joined: Aug 16, 2001
Posts: 4
You can use Bali to achieve this They have a JSP to swing Framework
I agree. Here's the link:
subject: Why can't I use swing?
It's not a secret anymore!