Results 1 to 5 of 5
Thread: Quick Applet Issue
- 08-15-2012, 10:02 PM #1
Member
- Join Date
- Aug 2012
- Posts
- 3
- Rep Power
- 0
Quick Applet Issue
Hi,
I just started using Eclipse, and when I create an application in Java3D it shows up just fine and dandy running as an application, but when I go to run it as an Applet, it shows a grey box. Is that a common issue? How can I fix it...
I am remembering now that I tried creating an Applet that says "hello world" which also did not work at all (following a tutorial). The code was:
It is from this tutorial: Java Applets Basic TutorialJava Code:import java.applet.*; import java.awt.*; public class HelloWorldApplet extends Applet { public void paint (Graphics g) { g.drawString ("Hello World", 25, 50); } }
Am I doing something wrong? I am on an Ubuntu machine and I'm using OpenJDK 6 and 7 (both installed... not sure why). Java applets all over the internet work... Facebook, RuneScape, etc.
Thanks!
- 08-15-2012, 10:20 PM #2
Re: Quick Applet Issue
Probably. Are there any messages in the browser's java console? What does the HTML page have in it that calls the applet code? Where is the applet's class file?Am I doing something wrong?If you don't understand my response, don't ignore it, ask a question.
- 08-16-2012, 04:24 AM #3
Re: Quick Applet Issue
Please go through the Forum Rules -- particularly the third paragraph.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 08-16-2012, 08:23 PM #4
Member
- Join Date
- Aug 2012
- Posts
- 3
- Rep Power
- 0
Re: Quick Applet Issue
Okay, I'm not actually using a browser but rather I'm choosing "Run as Applet" in Eclipse. Should I use an html document to run all my applets? I remember trying that and getting an "iced tea crashed" or something similar. I was using Firefox&Chrome (tried both & got same error). I'm not sure how to check the java console in the browser, but I will go and try the things you mentioned again: Start in browser, check console...
I'm unsure of what you mean by:
Do you mean the file that contains java.applet? I have no idea where it is! Maybe I don't have it... that would be an obvious reason as to why it's not working, but I'm not getting any errors when I run it.Where is the applet's class file?
@db: How can I change the post-title? There doesn't seem to be an option... sorry about the confusion.
- 08-16-2012, 08:38 PM #5
Re: Quick Applet Issue
When you compile a java file successfully, the compiler creates one or more class files.I'm unsure of what you mean by:
If you are using the IDE: Eclipse, I have no idea where it puts files and how it executes an applet's class file.
Try asking in the IDE forum:
EclipseIf you don't understand my response, don't ignore it, ask a question.
Similar Threads
-
Quick Java Applet Study
By obrienfk in forum Reviews / AdvertisingReplies: 0Last Post: 02-02-2011, 04:05 PM -
Quick applet question!!
By fezman1337 in forum JCreatorReplies: 1Last Post: 12-21-2010, 02:22 AM -
Applet Mac issue
By omdom in forum Java AppletsReplies: 1Last Post: 08-23-2009, 07:54 PM -
A Quick Applet Question :)
By smithywill in forum New To JavaReplies: 1Last Post: 07-15-2009, 01:35 PM -
Java Applet Issue
By bmw4l1f3 in forum New To JavaReplies: 9Last Post: 11-13-2008, 04:39 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks