I defined a variable like this:
public int XX,YY;
I need to use this in my canvas:
Mymidlet LF= new Mymidlet();
This Code is not work!
What is the problem?
1. As far as possible, avoid declaring variables public. Provide accessors and/or mutators only when needed.
2. By convention, variable names in Java start with a lowercase letter.
3. Pass a reference to the MIDlet to the constructor of the Canvas subclass using the <tt>this</tt> keyword.
No, in the <tt>MIDlet</tt>. This is a programming forum. Java is case sensitive. And if you really find it too much effort to use the correct case when posting on a forum, I doubt that you have what it takes to complete a program.
If you still can't understand what you need to do, post a [url http://mindprod.com/jgloss/sscce.html]SSCCE (Short, Self Contained, Compilable and Executable) example that demonstrates where you're stuck.
Edited by: Darryl Burke on 22 Oct, 2010 4:51 PM