and i am compiling the ExtendedApplet.java, then i run it, and sends this error: Exception in thread "main" java.lang.NoSuchMethodError: main
am I doing everithing ok? what can i do to solve this?
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35220
7
posted
0
and i am compiling the ExtendedApplet.java, then i run it, and sends this error: Exception in thread "main" java.lang.NoSuchMethodError: main
How are you running it? Applets are not applications that you can run from the command line - they don't have a "main" method. You need to open an HTML file that contains an applet tag for this particular applet in your web browser.
I was asked to do two clocks and that the user could edit the hours, as I said in the first post. But I was told too, that i cannot use applet.
So: To do such a program that I could not use applet nor dhtml. How should I do it?
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35220
7
posted
0
is this an assignment of some sort, designed to make your life harder than necessary?
Well, what technologies can you use then? A standalone Java application? Flash?
Jack Bolton
Ranch Hand
Joined: May 08, 2006
Posts: 65
posted
0
but if it would be a A standalone Java application.
How would I draw the clock?
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35220
7
posted
0
Umm ... the same way you would do it in an applet. Are you familiar with the AWT and/or Swing drawing toolkits?
Jack Bolton
Ranch Hand
Joined: May 08, 2006
Posts: 65
posted
0
this is my program: I put it all here, so you can run it, and see what happens I converted it to a standalone Java application. the program runs, and gives the time, but it stays there, it doesn't update.
What can I do so it updates?
Clock2.java
[ April 21, 2007: Message edited by: Jack Bolton ]
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35220
7
posted
0
You don't seem to ever call the start method. In applets, the method is called by the container, but the code you have is not an applet.