Results 1 to 11 of 11
Thread: Help Me Out Guys
- 07-09-2007, 05:20 PM #1
Member
- Join Date
- Jul 2007
- Posts
- 9
- Rep Power
- 0
Help Me Out Guys
i Am A Beginer In The Field Of Java.....my Question Is I M Using Jdk1.3 But The Programs On Awt Is Not Running On The Complier.so Do I Need To Download Extra Software/package For That.....even The Applet Programs R Not Running...help Me
Last edited by JavaBean; 07-09-2007 at 05:23 PM. Reason: [b] tag removed from the post. prince24: please use case for your post. This is harder to read!!
- 07-09-2007, 08:25 PM #2
Tell us detailed exception. What do you get when you try to run AWT applications?
- 07-10-2007, 07:29 AM #3
Member
- Join Date
- Jul 2007
- Posts
- 9
- Rep Power
- 0
WHEN I TRY TO RUN THIS SIMPLE PROGRAM :
import java.awt.*;
import java.applet.*;
<applet code="hourglass" width=230 height=210>
</applet>
public class hourglass extends Applet {
public void paint(Graphics g) {
int xpoints[]={30,200,30,200,30};
int ypoints[]={30,30,200,200,30};
int num=5;
g.drawPolygon(xpoints,ypoints,num);
}
}
AS SOON AS I GIVE THE COMMAND javac hourglass.java it says
hourglass.java:4: 'class' or 'interface' expected
<applet code="hourglass" width=230 height=210>
^
1 error
wat t do
- 07-10-2007, 12:46 PM #4
I suggest you to read this applets tutorial before going on. :)
You put HTML code inside your Java class. Those lines should be in an html file. When the compiler see those HTML lines, it gives error to you. Read the tutorial i sent. You will see your mistake.
- 07-11-2007, 02:18 AM #5
Member
- Join Date
- Jul 2007
- Posts
- 9
- Rep Power
- 0
Thanks for ur valuable suggestion but now a new problem arise an applet is loaded on the desktop but it is blank and also it states that::::
applet not initialized
at the bottom of the applet.....
m i wrong again at something????
- 07-11-2007, 03:29 AM #6
Member
- Join Date
- Jul 2007
- Posts
- 5
- Rep Power
- 0
Hi Theres a mistake in your applet code
<applet code="hourglass" width=230 height=210>
</applet>
instead of this there should be <applet code="hourglass.class" width=230 height=210>
</applet>
dont forget to put .class extension otherwise your program wont work.....
- 07-12-2007, 10:38 AM #7
Member
- Join Date
- Jul 2007
- Posts
- 9
- Rep Power
- 0
thanks neha for ur help i tried wat u pointed out but the problem still persists
:( :( :(
- 07-12-2007, 11:04 AM #8
The applet should return an exception. You need to learn the details about the exception. What is it and which line the exception is being thrown? These details should be shown on Java Console. Check following resources:
Java Plug-in Console
Enable and View Java Console Window - 1.4.2_xx
After knowing the details about the exception, we can advise you a solution.
- 07-13-2007, 07:23 AM #9
Member
- Join Date
- Jul 2007
- Posts
- 5
- Rep Power
- 0
You know your program is perfect I ran it on my machine and its giving me the output without any error.
do one thing make a new file and then copy and paste ur prog and then run it
- 07-13-2007, 02:04 PM #10
Member
- Join Date
- Jul 2007
- Posts
- 9
- Rep Power
- 0
Thanks Neha But I Would Be Glad If U Could Tell Me What Commant U Gave To Run The Program
- 07-13-2007, 04:52 PM #11
Member
- Join Date
- Jul 2007
- Posts
- 9
- Rep Power
- 0
Similar Threads
-
Hello Guys
By angelijie in forum IntroductionsReplies: 9Last Post: 05-23-2008, 12:18 PM -
Hi Guys
By gibsonsydsa in forum IntroductionsReplies: 1Last Post: 02-06-2008, 06:36 AM -
hi guys!!!
By surenani in forum IntroductionsReplies: 4Last Post: 01-23-2008, 05:24 AM -
Hie guys
By heat84 in forum IntroductionsReplies: 1Last Post: 12-20-2007, 06:50 AM -
Hello guys
By tharindu in forum IntroductionsReplies: 0Last Post: 11-26-2007, 07:58 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks