Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Java Applet Program

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've never done this before, but I'm trying to take a program I made and put it on a website. I read that to do this I need to make it an applet. I'm not sure if I did this wright, but this is my code.


As a program it worked as long as I had the user input their first name only (ex. j), but if I have the user input their last name too (ex. j m), it doesn't work for some reason. Then when I tried to run it as an applet, it acts wonky. I type the name in and nothing happens. Can anyone help me?
 
author
Posts: 23878
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Applets are called by the browser via the init(), start(), stop(), and destroy() methods. You haven't implemented those methods.

Also, the browser will not let the applet write to standard out. You need to implement the GUI.

Henry
 
Henry Wong
author
Posts: 23878
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

And BTW, please be more careful picking a forum next time. The ranch office forum is for discussions regarding the ranch... moving this to the beginner's forum.

Henry
 
    Bookmark Topic Watch Topic
  • New Topic