Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MIDlets and classes

 
Max Simpson
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Is a MIDlet a single class file or multiple class files? I am a bit confused because when using an IDE to create a MIDlet, everytime I create a new class it is just added to the bottom of my existing class.
I tried working with a MIDlet suite, but the seperate class files do not "see" each other and the program will not work.
Thanks!
 
Punit Raizada
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hmmmm....

Which IDE are u using ???
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A MIDlet is one class. A MIDlet application (packaged in a JAR file) can contain the MIDlet class and any number of other supporting classes.

A Java file can define one public class and any number of non-public classes. A MIDlet application can have any number of Java files.
 
Max Simpson
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. I was confused and thought a Midlet was like a package and contained multiple class files. I guess a Midlet Suite is what I should be using for multiple class files.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic