473,382 Members | 1,329 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

AWTEvents errors and deprecated methods

I am getting some errors/warnings that I don't understand. This code is in
a Java app that uses Swing J Components with an ActionListener. The
code/errors/warnings follow. Thanks for any help, Mike

import javax.swing.*;
import java.awt.event.*;
import java.awt.*;

public class GraphicalImp extends UIImp implements ActionListener
{
....//snipped code

public void actionPerformed(ActionEvent e)
{
String input = userInput.getText().trim();
choice = Integer.parseInt(input);
String searchKey = otherInput.getText().trim();
int userSelection = facade.getUserSelection();
String[] resultSet = facade.
processUserSelection(userSelection,searchKey);
facade.displayResultSet(resultSet);

}

....//snipped

ERRORS/WARNINGS
..\java\awt\Frame.java:72: class$ is reserved for internal use
Class class$(String arg0)
^
..\java\awt\Font.java:240: package AttributedCharacterIterator does not exist
public AttributedCharacterIterator.Attribute[] getAvailableAttributes()
^
..\java\awt\AWTEvent.java:30: cannot resolve symbol
symbol : constructor EventObject ()
location: class java.util.EventObject
{
^
..\java\awt\AWTEvent.java:40: cannot resolve symbol
symbol : constructor EventObject ()
location: class java.util.EventObject
{
^
..\java\awt\AWTEvent.java:49: cannot resolve symbol
symbol : constructor EventObject ()
location: class java.util.EventObject
{
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -deprecation for details.
5 errors

Tool completed with exit code 1

Jul 17 '05 #1
3 2829

"Michael G" <mi****@montana.com> wrote in message
news:3f********@127.0.0.1...
I am getting some errors/warnings that I don't understand. This code is in a Java app that uses Swing J Components with an ActionListener. The
code/errors/warnings follow. Thanks for any help, Mike ...//snipped

ERRORS/WARNINGS
.\java\awt\Frame.java:72: class$ is reserved for internal use
Class class$(String arg0)
^
.\java\awt\Font.java:240: package AttributedCharacterIterator does not exist public AttributedCharacterIterator.Attribute[] getAvailableAttributes()
^
.\java\awt\AWTEvent.java:30: cannot resolve symbol
symbol : constructor EventObject ()
location: class java.util.EventObject
{
^
.\java\awt\AWTEvent.java:40: cannot resolve symbol
symbol : constructor EventObject ()
location: class java.util.EventObject
{
^
.\java\awt\AWTEvent.java:49: cannot resolve symbol
symbol : constructor EventObject ()
location: class java.util.EventObject
{
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -deprecation for details.
5 errors

Tool completed with exit code 1


The problem with these errors is that it is in Sun's code not mine. I am
using jdk1.4.1 and I have the associated docs. Makes no sense to me.

Thanks, Mike
Jul 17 '05 #2

"Michael G" <mi****@montana.com> wrote in message
news:3f********@127.0.0.1...
I am getting some errors/warnings that I don't understand. This code is in a Java app that uses Swing J Components with an ActionListener. The
code/errors/warnings follow. Thanks for any help, Mike


I get the following when using "javac -deprecation ..."

C:\CS595\VEHICL~1\VEHICLE>javac -deprecation ProcessingFacade.java
..\java\awt\Frame.java:72: class$ is reserved for internal use
Class class$(String arg0)
^
..\java\awt\Font.java:240: package AttributedCharacterIterator does not exist
public AttributedCharacterIterator.Attribute[] getAvailableAttributes()
^
..\java\awt\Component.java:1176: warning: postEvent(java.awt.Event) in
java.awt
enuContainer has been deprecated
public boolean postEvent(Event arg0)
^
..\java\awt\Frame.java:8: warning: postEvent(java.awt.Event) in
java.awt.MenuCo
ainer has been deprecated
public class Frame extends Window implements MenuContainer
^
..\java\awt\AWTEvent.java:30: cannot resolve symbol
symbol : constructor EventObject ()
location: class java.util.EventObject
{
^
..\java\awt\AWTEvent.java:40: cannot resolve symbol
symbol : constructor EventObject ()
location: class java.util.EventObject
{
^
..\java\awt\AWTEvent.java:49: cannot resolve symbol
symbol : constructor EventObject ()
location: class java.util.EventObject
{
^
5 errors
2 warnings
Jul 17 '05 #3

"Michael G" <mi****@montana.com> wrote in message
news:3f********@127.0.0.1...

"Michael G" <mi****@montana.com> wrote in message
news:3f********@127.0.0.1...


Finally figured it out. It was a compatibility error. I was using an IDE,
I won't mention which one, and it was giving me a NullPointer exception if I
ran it in the normal mode and it wouldn't throw the exception if I ran it in
the debug mode. So I had the brilliant idea of using a command-line javac.
The IDE placed the .class files in a jar, so I just let MY javac, not the
IDE's, create .class files in the current dir. Anyway, once I did that the
goofy errors started showing up. I don't totally understand why. To make a
long story short - I spent almost all day yesterday trying to figure this
thing out - I had too many versions of Java on my pc and I made the mistake
of assuming that Java was consistent between versions. Shame on me.
Jeff thanks for your help. Your insight got me on the right track.
Mike
Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

99
by: David MacQuigg | last post by:
I'm not getting any feedback on the most important benefit in my proposed "Ideas for Python 3" thread - the unification of methods and functions. Perhaps it was buried among too many other less...
1
by: Hafeez | last post by:
I am having real trouble compiling this code http://www.cs.wisc.edu/~vganti/birchcode/codeHier/AttrProj.tgz The attachment shows errors when compiled using the current version of g++ in a...
6
by: Mark Pappert | last post by:
I've got a linked 'common.js' file that contains one function, on IE and Firefox everything works as expected. However, Opera generates the following error: ...
2
by: AMT2K5 | last post by:
Hello. When I compile my program I recieve lots and lots of the following message which I am trying to decipher. "xxx was declared deprecated". What exactly does that mean?
185
by: Martin Jørgensen | last post by:
Hi, Consider: ------------ char stringinput ..bla. bla. bla. do {
5
by: Scirious | last post by:
People, how many deprecated methods have really been removed and no longer exists? TIA, Scirious.
2
by: gavino | last post by:
REHDAT LINUX 4S PHP 4.3.9 LEGACY APP I MOVED NOW EATS MEMORY CAN ANYONE TAE A LOOK ? I FIXED ONE PARTIALLY BY CHANGING TO here are my apache settings: 1 page laoding for a few seconds eat like...
5
by: Mike Kent | last post by:
For Python 2.5 and new-style classes, what special method is called for mylist = seq and for del mylist (given that mylist is a list, and seq is some sequence)? I'm trying to subclass list, and...
13
by: ameshkin | last post by:
I have no idea whats causing this error on this page. It makes it so that the mousovers on the icons don't work. http://www.promoventures.com/quotes2/
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.