File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Display - Best practice

 
Peter Miklosko
Ranch Hand
Posts: 76
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

ImageHttp.java


MainMenu.java


In my opinion this better solution then sending instance of Displayable argument to next class.
 
Amila Jayatillaka
Greenhorn
Posts: 28
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Midlet Class


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

 
Peter Miklosko
Ranch Hand
Posts: 76
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was recommended following approach




 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic