Question

My question is simple, however I'm so new to codename one, I have no clue. I have a working series of classes in my project, there is a main class that initializes the others. I have an interface designed using codename one, however I don't know where to initialize my main class, i.e., invoke the builder of the class.

I've tried several things, however when I run the application, the simulator just gets all grey and nothing happens.

Help really appreciated!

David.

Was it helpful?

Solution

When you create a new project in Codename One you specify a package, this is crucial since changing that package later is a bit hard. All native mobile apps rely on something similar to a package so Codename One uses this to identify your app.

Within this package is the main class baring the name of your application. It has 4 methods by default init(Object), start, stop, destroy. For a GUI builder application you also have the initVars(Resources) method in the Statemachine class.

So generally use the init methods.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top