Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Form components

 
Chris Bilinski
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
I would like to know, how to create a new component, which can be added to Form or Alert. I browsed the MIDP documentation, but haven't found what to do. I suppose I should overwrite few methods: "paint()" (both of them?), "keyPressed"... and I don't know what more. Is there any good tutorial concerning this subject?
I'm using MIDP for PalmOS.
Thanks,
 
Eric Giguere
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only way to create new components is to make the screen a Canvas and to do all the drawing yourself. You can't make new items for forms.

------------------
Eric Giguere
author of:
Java 2 Micro Edition : A Professional Developer's Guide
PalmTM Database Programming: The Complete Developer's Guide
 
Chris Bilinski
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks,
Another few questions and doubts:
- Do I need to draw the whole screen?!
- As I see, I cannot mix standard components with my own. True?
- So, I connot use Form class. True?
- So, I need to make the whole bunch of components, like buttons, lists, editBoxes... to make it work. True?
If all this is true, then I need to make the whole framework
It is hard work, as I see ((
Best regards
 
j oa
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
You can create your own item making a class that extends CustomItem
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"j oa"-
Welcome to the JavaRanch! Please adjust your displayed name to meet the

JavaRanch Naming Policy.

You can change it

here.

Thanks! and welcome to the JavaRanch!

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic