Article View: borland.public.jbuilder.java.api
Article #1538Re: deprecated method : how to solve?
From: JPaul Molina
Date: Mon, 26 Nov 2001 17:30
Date: Mon, 26 Nov 2001 17:30
64 lines
3029 bytes
3029 bytes
I'm using JBuilder3 for the very moment and wish to update all stuff.
"Avi Abrami" <aabrami@intersystemsww.com> a οΏ½crit dans le message news:
3C00E9CC.9A2A3753@intersystemsww.com...
> 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)
> > {
> > file://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:
<3c027c2f_1@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnewsReferences:
<3c00999f_1@dnews> <3C00E9CC.9A2A3753@intersystemsww.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 1089d0,2a57e925525ce1f0 X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2001-11-26 09:34:30 PST From: "JPaul Molina" <mjeanpaul@nerim.fr> Newsgroups: borland.public.jbuilder.java.api References: <3c00999f_1@dnews> <3C00E9CC.9A2A3753@intersystemsww.com> Subject: Re: deprecated method : how to solve? Date: Mon, 26 Nov 2001 18:30:08 +0100 Lines: 66 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 NNTP-Posting-Host: 62.212.98.222 Message-ID: <3c027c2f_1@dnews> X-Trace: dnews 1006795823 62.212.98.222 (26 Nov 2001 09:30:23 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews