Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Trying to run applet

 
David Henstridge
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So I have just learned that applets are different animals.

They don't need a main class to run.
Or at least that is what I was told.

So I try to run an applet and up pops an error message saying:

Project does not have a main class set!

So my questions are:

1. Does a java applet require a main class?
2. If so how do I set one so my applet will run?
3. Why does the fellow in the video not have a main class set in his code, yet his applet runs?

TIA

It may be useful to know that when I cleaned and built the applet it was successful and built a .jar.
But it won't run.

 
Paul Clapham
Sheriff
Posts: 21572
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. No, it doesn't.

2. You don't set one because that's not how an applet works.

3. See 2.

That may seem kind of terse and dismissive. But I'm here to advise you not to waste your time on applets, that's why I'm not expanding on those answers. They are a technology which is, if not quite dead, a niche technology. You aren't going to find a use for applets, and if you do happen to find one then you'll find yourself in a tar pit of security features. So you'd be better off looking elsewhere for things to learn about Java.
 
David Henstridge
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:1. No, it doesn't.

2. You don't set one because that's not how an applet works.

3. See 2.

That may seem kind of terse and dismissive. But I'm here to advise you not to waste your time on applets, that's why I'm not expanding on those answers. They are a technology which is, if not quite dead, a niche technology. You aren't going to find a use for applets, and if you do happen to find one then you'll find yourself in a tar pit of security features. So you'd be better off looking elsewhere for things to learn about Java.


OK thanks Paul. All this is new to me, but I will certainly take your word for it and move on from applets.
I was investigating key actions and this video was showing how to use the dreaded keytype/keypress events that you also don't take kindly to.

So onward and upward.

I have created a Frame (not using applets) a panel and a button.
Now my goal is to not only find out how to use the keyboard to execute the button code,
but to find out how my main program that I am studying uses their own, different code,
to access events with keystrokes (possibly key events).




 
Paul Clapham
Sheriff
Posts: 21572
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Video tutorials -- another thing I don't care for. If you miss something near the beginning (as it looks like you might have done) it's hard to look back and find it. Harder than a page of text, at least for somebody like me who is used to scanning pages of text to extract information.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic