Hi , deprecated problem.

P

Peter

Hi
Here is my code:

import javax.swing.*;
import javax.swing.border.*;
import javax.swing.plaf.basic.*;
public class PComboBox_ComboPopup extends BasicComboPopup {
Border border1;
public PComboBox_ComboPopup(JComboBox comboBox) {
super(comboBox);
BasicComboPopup a=new BasicComboPopup(comboBox);
a.show();
}
public void show() {
}

}
compiled by:

C:\>javac PComboBox_ComboPopup.java
Note: PComboBox_ComboPopup.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

The compile warn me because i overrided a deprecated method (but i
have checked the manual, show is not a deprecated method in class
BasicComboPopup).

Why don't the compile warn me i called a deprecated method?? Is it a
bug?
i am using jdk 1.4.2

thanks
from Peter ([email protected])
 
J

JScoobyCed

Peter said:
Hi Hi,

The compile warn me because i overrided a deprecated method (but i
have checked the manual, show is not a deprecated method in class
BasicComboPopup).

Yes, but the method show() in Component *is* deprecated. Thus the
warning note in the compiler.
 
A

Andrew Thompson

On 22 Sep 2004 03:48:43 -0700, Peter wrote:

[1]
X-Trace: posting.google.com ...

Posts can take a while to filter through to the archive.
...
Here is my code:

Yes, we saw the same thing less than an hour ago,
and two people (besides JScoobyCed) have offered
assistance.

Usenet is not an 'instantaneous help-service' Peter,
you need to make a post then wait a day or so for
replies before you go dashing off another version of
the question. Even more so if you are posting
through Google [1].

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.lensescapes.com/ Images that escape the mundane
 
T

Tor Iver Wilhelmsen

C:\>javac PComboBox_ComboPopup.java
Note: PComboBox_ComboPopup.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
....

i am using jdk 1.4.2

No, you are not, because the -Xlint option was added in 1.5.
 
A

Alex Hunsley

Peter said:
Hi
Here is my code:

import javax.swing.*;

[snip]
Peter, please don't post the same problem twice within an hour. I'm
aware that maybe you thought it hadn't appeared - be aware that posts
via google can take a while to appear.

alex
 
P

Peter

JScoobyCed said:
Yes, but the method show() in Component *is* deprecated. Thus the
warning note in the compiler.

I am using jbuilder 2005, it uses jdk1.4.2 to compile, so really don't
know why it give me this warning.
thanks
from Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,222
Members
46,810
Latest member
Kassie0918

Latest Threads

Top