File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java Micro Edition and the fly likes Display - Best practice Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Display - Best practice" Watch "Display - Best practice" New topic

Display - Best practice

Peter Miklosko
Ranch Hand

Joined: May 26, 2009
Posts: 76
What is best practice in handling movement from screen to screen in midlet?
My teacher at university wasn't able to explain this to me, could be due to that he chuck whole 300+ lines in one file.
Secondly none of the books or tutorials that I read so far went on discussing this.
So here is how I do it and I would like to know if my approach is correct and if not I would like to know how to handle this correctly.

In my opinion this better solution then sending instance of Displayable argument to next class.
Amila Jayatillaka

Joined: Sep 29, 2006
Posts: 28
Midlet Class

In displayable classes, I'll get a instance of this midlet through constructor. And i'll call getDisplay() where ever i need...

SCJP 1.4, SCMAD 1.0, SCWCD 5.0
Peter Miklosko
Ranch Hand

Joined: May 26, 2009
Posts: 76
I was recommended following approach

I agree. Here's the link:
subject: Display - Best practice
It's not a secret anymore!