How can I draw rectangles with Java ME? Sorry, but I am new to Java and have to use Java ME for this project.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s hard to know exactly how much detail to go into because you don’t mention what you’ve done with ME so far, but the basic idea is:
So example code looks roughy as follows. Create a Canvas class something like this:
Then something like this in your MIDlet class:
Good guides to Java ME should give you an overview of other methods available on Graphics, other code you’ll need in your MIDlet class, how to handle Commands (for handling button presses) etc.