Creating a Java Applet in NetBeans

Getting the applet to appear

Page 1 of 1

5 Replies - 106833 Views - Last Post: 21 March 2010 - 04:47 PM Rate Topic: -----

#1 sharkbate24  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 1
  • View blog
  • Posts: 28
  • Joined: 14-April 09

Creating a Java Applet in NetBeans

Posted 11 May 2009 - 08:00 AM

Hi everyone,

Basically, I'm trying to create a Java applet. However, I do not know how to call the applet from the Main code. Normally, from the MAIN code, I would just call for a function, but applets don't have a main function.

Please tell me if I'm doing something wrong. Here is a GIF Animation / Video Presentation of what I am doing:

Posted Image

Please bare with me as I am new to Java,
Thanks!

Is This A Good Question/Topic? 0
  • +

Replies To: Creating a Java Applet in NetBeans

#2 g00se  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2687
  • View blog
  • Posts: 11,349
  • Joined: 20-September 08

Re: Creating a Java Applet in NetBeans

Posted 11 May 2009 - 08:07 AM

Applets don't have a main method. You're creating an application. You need to create an applet
Was This Post Helpful? 0
  • +
  • -

#3 sharkbate24  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 1
  • View blog
  • Posts: 28
  • Joined: 14-April 09

Re: Creating a Java Applet in NetBeans

Posted 11 May 2009 - 08:18 AM

There is no applet in the new project window.

Thanks for the reply.
Was This Post Helpful? 0
  • +
  • -

#4 g00se  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2687
  • View blog
  • Posts: 11,349
  • Joined: 20-September 08

Re: Creating a Java Applet in NetBeans

Posted 11 May 2009 - 08:44 AM

You create a new Java application, ignore the createion of a main class and then add an applet
Was This Post Helpful? 1

#5 Guest_Fabio*


Reputation:

Re: Creating a Java Applet in NetBeans

Posted 21 March 2010 - 04:44 PM

and..
Was This Post Helpful? 0

#6 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10468
  • View blog
  • Posts: 38,800
  • Joined: 27-December 08

Re: Creating a Java Applet in NetBeans

Posted 21 March 2010 - 04:47 PM

If you want to run a JApplet and a JFrame at the same time, you might want to check out pbl's snippet on this. If you have a specific question regarding code you wrote, feel free to open up a new thread and we will be more than happy to help you. :)

Link: http://www.dreaminco...snippet4467.htm
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1