Sunday, April 18, 2010

Hello friendz ! Now a days m learning J2ME mobile application technology n believe me its really very interesting. All you need is just a l'il bit knowledge of java programming language. Here I'll demonstrate some basic things of J2ME language which would help many of you.
Lets start with a small "Hello World" application which will print Hello World On Your mobile while running.......
Just open NetBeans IDE n click on New Project(Ctrl+Shift+N)>>Choose Java ME(Categories)>>Mobile Application(Projects)>>Now click on NEXT>>

Now enter the project name(HelloWorld)>>And uncheck the below Create Hello MIDlet check box.

>>Click on NEXT>>Select Device profile: MIDP-2.0>>And then click on finish

Now click on +Source Package >> Then right click on >> New >> MIDlet...

Write the name of the MIDlet (anything) and click on finish button

Then you'll see a screen similar to following

Import the javax.microedition.lcdui.*; namespace to your application
Now just add the four lines of code in startApp() method

 To show a message to user we use Alert as i used above
press F6 to run the application

Click on launch

To Find the .jar file goto >>> My Documents\NetBeansProjects\HelloWorld\dist folder where you can find the helloWorld.jar application which can be easily run in any java technology enabled mobile phone (Nokia , Sony etc.)

Saturday, April 3, 2010

Hello friends !
In visual studio there are many controls which are very useful but many students never used them as their faculty never told them about such controls.
I'm also talking about a similar small but very useful control available in vs n I'll show you how it works...........
Its FileSystemWatcher Control which helps you to watch any folder or Drive, means you can find which file got deleted, created moved or renamed in that particular drive or folder..
Just open visual studio >>New Project >>Windows Application>>
In the All Window Forms Controls Tab >>you can find a control named FileSystemWatcher

Just add that control to your form
Now select the control and press F4 for properties and make the changes as I did (see snap below)
1st property is the name of the control
2nd property is about Control's Enable or Disable stat.........
IncludeSubdirectories - whether or not the control watch the sub-directories or the main directory which was set in Path property
Path - one of the main property - here we'll set the path of the drive or folder which we are watching for........
Now click on EVENTS button to generate events

Just double click on each of the events to generate the event handlers.........

                Main App Snap
For more coding details please download the source project

DOWNLOAD VS2008 Project Coding