🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #1537

Re: deprecated method : how to solve?

#1537
From: Avi Abrami
Date: Sun, 25 Nov 2001 12:53
56 lines
2765 bytes
JPaul Molina wrote:

> In a scrolldown menu applet :
>
> the following method is deprecated
> public boolean handleEvent(Event event)
>    {
>        highlight(event.x, event.y);
>        mousex = event.x;
>        mousey = event.y;
>        return super.handleEvent(event);
>    }
>
> so I try to replace with :
> protected void processEvent(AWTEvent event)
>    {
>    //if (e.getID() == Event.??????)
>
>        highlight(event.x, event.y);
>        mousex = event.x;
>        mousey = event.y;
>        super.processEvent(event);
>    }
> but I 've gotten errors such x , y not found in AWTEvent class.
> then replacing event with Event (from class Event ) I have gotten error such
> 'cannot make a static reference to a non static variable x...'
>
> How to make this method working?
>
> thanks

Hi JeanPaul,
It seems to me that you are using version 1.0 of the java language.
The event handling mechanism in version 1.1 of the java language
changed enormously. The two major web browsers -- Netscape
and Micro$oft Internet Explorer -- account for more than 80%
of all web browsers in use today, and they both implement version
1.1 of java language (with a few exceptions in Micro$oft's case).

In fact, the latest version of Netscape supports java 1.3, and
there's always the plug-in option available as well. So I think
you're going to have to "upgrade" to at least version 1.1 of
java. True, there may still be some browsers around that only
support java 1.0, but there's probably so few of them that it's
not really worth the effort (I think).

I suggest you look at the following web page:

http://developer.java.sun.com/developer/onlineTraining/

It has some tutorials on AWT and Swing that should help
you become acquainted with the new event handling
mechanisms.

Good Luck,
Avi.
Technical Details
Message-ID: <3C00E9CC.9A2A3753@intersystemsww.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!supernews.com!priapus.visi.com!news-out.visi.com!hermes.visi.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews
References: <3c00999f_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,2a57e925525ce1f0
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2001-11-25 05:15:15 PST
Message-ID: <3C00E9CC.9A2A3753@intersystemsww.com>
Date: Sun, 25 Nov 2001 14:53:32 +0200
From: Avi Abrami <aabrami@intersystemsww.com>
Organization: InterSystems Ltd
X-Mailer: Mozilla 4.78 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.api
Subject: Re: deprecated method : how to solve?
References: <3c00999f_1@dnews>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 212.199.57.202
X-Trace: dnews 1006692708 212.199.57.202 (25 Nov 2001 04:51:48 -0800)
Lines: 58
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!supernews.com!priapus.visi.com!news-out.visi.com!hermes.visi.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews