aspose file tools
The moose likes Java Micro Edition and the fly likes MIDP Graphics on Forms Objects Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Reply Bookmark "MIDP Graphics on Forms Objects" Watch "MIDP Graphics on Forms Objects" New topic
Author

MIDP Graphics on Forms Objects

Ankur Shah
Greenhorn

Joined: Nov 09, 2001
Posts: 10
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
john muchow
Ranch Hand

Joined: Mar 24, 2001
Posts: 49
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
 
 
subject: MIDP Graphics on Forms Objects
 
Threads others viewed
Swing related
Java 2D Shape classes (design question)
Is there a getPoints for a Graphics or Graphics2D object
Fitting ChoiceGroup labels onto the screen
Having a hard time figuring out how to accomplish this in Swing
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com