Pages

Showing posts with label netbeans. Show all posts
Showing posts with label netbeans. Show all posts

Friday, October 22, 2010

First view of java mobile app code and change it

When you build a java mobile game in software(like netbeans IDE or eclipse..)

first thing you‘ll see is  a middlet class .Middlet class used for handling start and

initialize and interface of java mobile applications. In netbeans you have sample

screen that can add button or text or image or like that .just you should drag your desired items from right side to screen and then go to source

 

netbeansscreen

screen is interface of your project in netbeans

For example you  have pre defined string seeing in screen and want changed it when middlet started. Code is like this

public void startMIDlet() {
       // write pre-action user code here
       switchDisplayable(null, getForm());
             stringItem.setText("my name is dawood");
       // write post-action user code here
   }

startMIDlet is function that using in every middlet .In netbeans for adding interface to screen using a form , should calling when middlet started.For this purpose have this code switchDisplayable(null, getForm());

and then add this for changing text stringItem.setText("my name is dawood");

and run it in emulator

emulator1

in start for do more thing in java games you should add canvas class that i’ll describe later

Thursday, September 16, 2010

Which tools you use for create mobile games?

 

        Ok first you should know tools that used .  There is so many tools you can use for create mobile   games.But three of them are most important than others.Everyone have some profit and loose to others  and on base of your needs can use one of them.

1.NETBEANS

netbeans691

Netbeans is oracle tool for java programming(windows and mobile and..).Oracle bought  java and Netbeans from sun company .Netbeans

have visual library.It means that for create some tools like web tool and windows form you can drag library like button and forms and textbox and..to your program without code.But It can’t use for some mobile 3d games.

2.Eclipse

Eclipse is ibm tool for for java programming.Andriod officially support eclipse(not netbeans because oracle and google problem).Netbeans have also plugin for android but isn’t officially supported.Eclipse ide have also better plugin support from netbeans.

eclipse

 

 

3.microsot visual studio(express have no mobile support)

Best to for windows mobile programming but no java mobile support

visualstudio

now ready for programming!

linkwithin

Related Posts Plugin for WordPress, Blogger...