[Logo]
Forums Register Login
MIDP Graphics on Forms Objects
Hello Javaranch
I'm doing development using MIDP for PalmOS. I'm familiar with how MIDlets work but I had a question about Graphics. Right now I have a Form object which displays the following objects: StringItem, TextField, a few Button Commands.
What I want to do is draw a rectangle on the upper half of the screen and the StringItem text be visible. So basically I want a rectangle drawn around the text that I display. What do I need to add codewise to add a rectangle. Can you give me a few lines of code to get me started?
Thanks
Ankur Shah
 

Originally posted by Ankur Shah:
Hello Javaranch
I'm doing development using MIDP for PalmOS. I'm familiar with how MIDlets work but I had a question about Graphics. Right now I have a Form object which displays the following objects: StringItem, TextField, a few Button Commands.
What I want to do is draw a rectangle on the upper half of the screen and the StringItem text be visible. So basically I want a rectangle drawn around the text that I display. What do I need to add codewise to add a rectangle. Can you give me a few lines of code to get me started?
Thanks
Ankur Shah


Hello Ankur,
Custom graphics that you are referring to must be done on a Canvas.
The Form and Canvas are referred to as "Displayable" objects. MIDP supports showing only one displayable at any time, thus, you cannot view both the Canvas and Form.
John Muchow
Author Core J2ME
Tell me how it all turns out. Here is a tiny ad:
ScroogeXHTML 7.1 - RTF to HTML5 / XHTML converter
https://coderanch.com/t/690611/ScroogeXHTML-RTF-HTML-XHTML-converter


This thread has been viewed 870 times.

All times above are in ranch (not your local) time.
The current ranch time is
Feb 19, 2018 11:15:33.