java function not found

Posted on 1998-08-24
Last Modified: 2013-11-23
I wrote this litte program. I compiled it and every time i try to run this applet i get the following
Info :java.lang.NoSuchMethodError: java.awt.Component: method enableEvents(J)V not found

Can you please tell me why?

import java.awt.*;
import java.awt.event.*;
import java.applet.*;

class Blatt
extends Canvas

  private boolean clicked;
  private Point Position;

  public Blatt()
   { this.Position.x = 20;
     this.Position.y = 20;
     this.clicked = false;

   public Blatt(Point Punkt)
      this.Position = Punkt;
      this.clicked = false;

   public void paint(Graphics g)

     protected void processMouseEvent(MouseEvent event)

      if (event.getID() == MouseEvent.MOUSE_PRESSED)
         if (clicked) clicked = false ;
            clicked = true;



public class BrainApplet extends Applet

       public void init()
        Blatt b = new Blatt();

        public void paint(Graphics g)
             g.drawString("Welcome to this tutorial! Value ", 20, 20);


Question by:stephan papadakis
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Author Comment

by:stephan papadakis
ID: 1222459
Edited text of question

Accepted Solution

msmolyak earned 50 total points
ID: 1222460
Most likely you are running your applet in non-JDK 1.1 compatible version of Navigator. To make sure that your applet is correct, try running in appletviewer. If it works fine and you indeed were using Netscape, get a latest version of communicator or download a JDK 1.1 patch for your version. You can find then in Java are on

Let me know if you need more information.

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question