wood burning stoves 2.0*
The moose likes Java Micro Edition and the fly likes how to create a button via J2ME Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "how to create a button via J2ME" Watch "how to create a button via J2ME" New topic

how to create a button via J2ME

kok seong chen

Joined: Dec 12, 2003
Posts: 19
i wonder how can i create a button(not soft button like ok and cancel)
i wanted to create buttons with graphics. Is that possible in J2ME?
Michael Yuan
Ranch Hand

Joined: Mar 07, 2002
Posts: 1427
You have two ways:
1. Draw a button on the Canvas and override appropriate key event handler methods in Canvas class to handle click events.
2. If you are using MIDP v2, you can develop a CustomItem and use it with the rest of the high-level (Form-based) UI.

Seam Framework: http://www.amazon.com/exec/obidos/ASIN/0137129394/mobileenterpr-20/
Ringful: http://www.ringful.com/
Ben Hui

Joined: Aug 26, 2003
Posts: 28
if you are using MIDP 2.0, you can create a String ITem of BUTTON type. it looks like a button on Sony Ericsson P900. I have a screenshot here

<a href="http://www.benhui.net" target="_blank" rel="nofollow">www.benhui.net</a> - mobile dev resources - j2me - bluetooth - midp 2.0 - review - links<p>Get Share Bill Buddy - Bill splitting (FAST!), Share trip expenses, Who Owe Me 3-in-1<br />Free trial on <a href="http://www.sklogicsoftware.com" target="_blank" rel="nofollow">www.sklogicsoftware.com</a><p>Get Travel Buddy - Itinerary, Tracker, Global Clock, Concurrency Convertor 4-in-1<br />Free version available at <a href="http://www.sklogicsoftware.com" target="_blank" rel="nofollow">www.sklogicsoftware.com</a>
kok seong chen

Joined: Dec 12, 2003
Posts: 19
thks guys
I agree. Here's the link: http://aspose.com/file-tools
subject: how to create a button via J2ME