• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

85 line program...wondering if it's possible to do in Applets

 
Ranch Hand
Posts: 495
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have never created an applet before. I do know Java and HTML though. I have a server, which is currently running as an application. Is there a way to port this to an Applet? If the server was online (I have a website that I could put it on), I wouldn't have to have it running on my computer. The client is running and will run as an application. Here is my server code:
NOTE: Places that are security codes and otherwise things you shouldn't know will be replaced with ******'s...Don't worry about that, just the application.

Do I have to make any major changes? Do I just have to extend Applet?
Thanks,
John Price aka cc11rocks
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't see a GUI, so I can't understand what would be the point of making it an applet. It is possible to have applets which don't display anything in their GUI, but why would you want a chat server to run as an applet?

Also you would have to sign your applet to allow it to act as a socket server.
 
john price
Ranch Hand
Posts: 495
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just need a server to be online, and not on my computer. Would a user have to be on my website for the server to work? If so, this is not what I want. I just got my first applet up and running on my website, so I guess I know how to use it know.
Check my knowledge please:
Applet starts code from init() method.

Question:
From the init method, you can add other methods to run?

Example of my Question (no I'm not writing code, just making sure I know how applets work):

If someone typed any character, the jtextfield would display the string "Hello World" in their, correct? I just want to make sure everything is the same.

General questions:
How do you use/create and what are signed applets?
What are the major differences between Applets and Applications, coding-wise? (I know there is no JFrame, JPanel, etc.)

Thanks,
cc11rocks aka John Price

EDIT FOR CLARIFICATION(To the people who may think I'm stupid and/or don't know how to code):
Yes, I know the code uphead won't compile. I am using a general overview to ask my question and give an example. I know you have to implement keylistener and use all the methods and stuff. I realize the jtextfield isn't initialized. This is a general type code, mostly asking about syntax and not about the code itself, since Java Applications and Applets (to my knowlege), have the same code (and especially for JTextFields).
 
Forget Steve. Look at this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic