Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


sushant
Xlint Error
1 Answer(s)      5 years and 3 months ago
Posted in : Java Beginners



Advertisement
View Answers

October 6, 2009 at 4:32 PM


Hi Friend,

The mouseDown()is a deprecated method therefore you got that error.Even then, it will display correct output.No need to recompile with -Xlint. And if you want another code then try the following:

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

public class updatedemo extends Applet {
int mouseX = -5;
int mouseY = -5;

public void init() {
addMouseListener(new HandleMouse());
setBackground(Color.magenta);
}
class HandleMouse extends MouseAdapter {
public void mousePressed(MouseEvent e) {
Graphics g = getGraphics();
mouseX = e.getX();
mouseY = e.getY();
update(g);
}
}
public void paint(Graphics g) {
g.setColor(Color.blue);
g.fillOval(mouseX-5, mouseY-5, 20, 20);
}
public void update ( Graphics g ) {
paint(g);
}
}

Thanks


Related Tutorials/Questions & Answers:
Xlint Error - Java Beginners
Xlint Error  import java.awt.*; import java.applet.... Java\graphics\Update Method>javac -Xlint updatedemo.java updatedemo.java:18... that error.Even then, it will display correct output.No need to recompile with -Xlint
Error with PrintDocument - Java Beginners
. Note: Recompile with -Xlint:unchecked for details. 1 error...Error with PrintDocument  Error: StudRec.java:526: printComponent(java.awt.Component) in PrintableDocument cannot be applied
Advertisements
java error - Java Beginners
been obsoleted. To get the details of your error, compile your class with Xlint as: javac -Xlint prime.java Thanks...: threadmethods.java uses or overrides a deprecated API. Note: Recompile with -Xlint
error
error  while iam compiling iam getting expected error
Error-
Error-   Hello, I would like to know about XSD file. I try to print XML file but I am getting error SAXException-- says Content is not allowed in prolog. Please help me
error
error  i have 404 error in my program plz tell me yhe solution about
error
error  i have 404 error in my program plz tell me yhe solution about
error
/ServletUserEnquiryForm.shtml getting an error given below SQLException caught: [Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error please suggest
Error
Error  I have created ajax with php for state and city. When I change state then city will not come in dropdown list and it give me error as 'Unknown Runtime Error'. This error come only in IE browser, but in other brower
error
error
error
error  java.lang.unsupportedclassversionerror:bad major version at offset 6 how to solve this????   Hi, Please check the version of framework used and also the JDK version. This type error also comes when java file
error
error  When I deploye the example I have this message cannot Deploy HelloWorld Deployment Error for module: HelloWorld: Error occurred during deployment: Exception while deploying the app [HelloWorld
error!!!!!!!!!
error!!!!!!!!!   st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
error!!!!!!!!!
error!!!!!!!!!   st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
error!!!!!!!!!
error!!!!!!!!!   st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;"); // ERROR out.println(" var pattern
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;"); // ERROR out.println(" var pattern
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;"); // ERROR out.println(" var pattern = /^\d{3,5
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;"); // ERROR out.println(" var pattern
error
error  whats the error.............. import java.util.Scanner; public class g { public static void main(String[] args) { Scanner s=new Scanner(System.in); int d,x,y; System.out.println("Enter the first number
error
"+it); } } this is my program i am getting an error saying cannot find symbol class string
java compilation error - Applet
java compilation error  hi friends the following is the awt front design program error, give me the replay E:\ramesh>javac...: Recompile with -Xlint:deprecation for details. E:\ramesh>   Hi friend
compilation error - Java Beginners
. Note: Recompile with -Xlint:deprecation for details."  Hi Friend... -Xlint:unchecked Anyways, it will make no harm and your program will get run
error message
error message  Sir i make one form facility with insert,update,delete.i want to error msg if any type of the data is missing and display in error msg which of the data is misssing
Permgen error
Permgen error  hi how can i solve permgen error
installation error
installation error  hi, m getting an error like " semicolon found in the selected path".how to resolve this error? during installation of jdk 1.6
error log
error log  hi my requirement is validate xml and xsd in java.If there is an errors then i will log error and store into error table. so plz if any one knows send code urgent. error table details-------------- Table
404 error
into jboss->server-> default->deploy folder it doesn't shows any error. but when i run this application by using localhost:8080/webapp ,it shows 404 error how should i slove this error
JSF error
JSF error  some of the users are not able to update the db. getting the error "An Error Occurred: Error calling action method of component with id CreateorManageOffer:jidjsp134312524923 Caused by: java.lang.NullPointerException
MAin error
MAin error  Error while running hello program in another dir rather in bin. path is already set. java -version jdk1.6.0_24 no error while compilation but @ d tym of runnin error in main class is generated Exception in thread
Error display
Error display  I want to give a message on the screen that an error has occured...but I dont want to use alert and give pop up box...any other solution for the problem
 

 

 

DMCA.com