Cldc and midlet

hi...
how to improve d look and feel of an application in MIDlet....like inserting background images and all?
thanks and regards in advance.

Is it possible to connect a database sql in cldc ,midlet application?
No its not possible bcoz in mobile we cant but such tables databases

Similar Messages

  • Lcdui and midlet classes

    hi-
    it seems that after i downloaded and installed midp4palm and j2me_cldc 1.0.2 the lcdui and midlet classes are both missing. i browsed to the cldc folder on my computer and checked in all the subfolders there. in the javax/microedition/ folder, only io is there, not lcdui and midlet also. did i miss something in downloading?
    help?
    thanks
    brandon

    Midp4palm is midp ... hum... for Palm !
    If you want the midp's API, you need to download a
    reference implementation for your desktop at :
    http://java.sun.com/products/midp/
    otherwise, you can download the J2ME wireless toolkit
    wich come with a midpapi zip file.Ok. I'm starting to catch on, what I've been looking for and can't seem to find is the documentation for ALL of the classes that are included / available in the MIDP. It seems to me that Sun is making this more confusing than it should be. I understand their desire to modularize (is that a word?) such that you pick the parts that are appropriate for you particular mobile device, but they need to do a better job of packaging. IMHO.

  • Downloaded Java ME SDK 3.0 but mising lcdui and midlet packages

    Hi,
    I have just started looking into J2ME and have downloaded and installed the SDK 3.0. i have tried also to setup a sample application from the Java site which requires imports of..
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;but when compiling it says the packages do not exist. I have searched the source code and they are not there, do i need to install anything else to get these to work?
    Thanks in advance
    Graham

    Note: This thread was originally posted in the [CLDC and MIDP|http://forums.sun.com/forum.jspa?forumID=76] forum, but moved to this forum for closer topic alignment.

  • How to install cldc and imaps

    All every one please help me, How to install the cldc and imaps.I download already but i don't know how to install them.

    All every one please help me, How to install the cldc
    and imaps.I download already but i don't know how to
    install them.Why do you post this in the algorithms section?
    Anyway, I don't know what you're talking about. I'd start looking on the website of the company that made the software. Presumably they have a FAQ-page and/or a page with installation instructions.
    Good luck.

  • CLDC and MIDP check

    Is there a way to check that CLDC and MIDP code will work on a mobile or PDA? Can you install something and check?

    You can use the method System.getProperty(String parameter);
    if you want ot get the vesion of CLDC, the parameter should be "microedition.configuration".
    Then, Getting the vesrion fo MIDP uses "microedition.profiles".

  • Where can I find the referrence implementations for CLDC and MIDP2?

    Can anyone pls get me the implementation packgages for CLDC and MIDP2?

    Look around the downloads section of the Sun site. The file name will be something like midp-2_0-src-windows-i686.zip.
    db

  • Blackberry controls and midlets

    Midlet meets blackberry let the battle for who can use the escape key begin!
    If you're having trouble mapping keys from the blackberry to your midlet..this will definitely help you!
    in this post I go over: Adding menu items to the blackberry menu, and gaining access to undetected keys such as the Escape Key.
    First of all, that **** menu how do I add stuff to it?
    Well...that in itself is a hastle but lemme just say, that menu
    is in a nutshell a CommandListener. Same freakin menu. Later on in this post I show how to map the escape key..and i'm guessing pretty much every other key...of course
    the only key I ever had a problem with was the EscapeKey/HangUpKey
    Anyways if you want that BlackBerry Menu Code here
    * MIDletDemo.java
    * Copyright © 1998-2008 Research In Motion Ltd.
    * Note: For the sake of simplicity, this sample application may not leverage
    * resource bundles and resource strings.  However, it is STRONGLY recommended
    * that application developers make use of the localization features available
    * within the BlackBerry development platform to ensure a seamless application
    * experience across a variety of languages and geographies.  For more information
    * on localizing your application, please refer to the BlackBerry Java Development
    * Environment Development Guide associated with this release.
    import java.util.*;
    import java.io.*;
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    import java.lang.*;
    * An Example MIDlet.
    * The application must extend the MIDlet class to allow the application management
    * software to control the MIDlet.
    public class MIDletDemo extends MIDlet implements CommandListener
        private Alert _alert;
        private int _time;
        private Form _form;
        private myCanvas customCanvas;
        private Display _display;
        private UpdateThread _updateThread;
         * The thread that updates the explosion dialog box.
        private class UpdateThread extends Thread
            private boolean _disarmed;
            public void run()
                _disarmed = false;
                int i = _time;
                while (i > 0 && !_disarmed)
                    try
                        _alert.setString(Integer.toString(i));
                        synchronized(this)
                                this.wait(1000);
                        System.out.println("timeout in:" +i);
                    catch(InterruptedException e)
                        System.out.println("MyMidlet: Exception: " + e);
                    i--;
                if(!_disarmed)
                    _alert.setString("BOOM");
            void disarm()
                _disarmed = true;
         * Thread that pops up the program's main dialog box.
        private class GoCommand extends Command implements Runnable
            private GoCommand(String label, int type, int priority)
                super(label, type, priority);
            public void run()
                _alert.setString(Integer.toString(_time));
                _alert.setTimeout(_time * 1000 + 5000);
                _updateThread = new UpdateThread();
                _updateThread.start();
                _display.setCurrent(_alert, _form);
         * <p>The default constructor. Creates a simple screen and a command with an alert
         * dialog box which pops up when the command is selected.
        public MIDletDemo()
            _alert = new Alert("The Thermonuclear Device has been activated!\nTo disarm the device, dismiss this Alert.\nDevice will detonate in:");
            _alert.setCommandListener(this);
            _time = 10;
            // Create a simple screen.
            _form = new Form("Thermo-Nuclear Event");
          _form.append("Choose 'Go' from the menu.");
         customCanvas = new myCanvas();
            _display = Display.getDisplay(this);
            // Add our command.
            //_form.addCommand(new GoCommand("Go", Command.SCREEN, 1));
    customCanvas.addCommand(new GoCommand("Go", Command.SCREEN, 1));
    customCanvas.setCommandListener(this);
            //_form.setCommandListener(this);
            _display.setCurrent(customCanvas);
        //_display.setCurrent(_form);
        public void commandAction(Command c, Displayable s)
            if ( c instanceof Runnable )
                ((Runnable)c).run();
            if( c == Alert.DISMISS_COMMAND )
                _updateThread.disarm();
            _display.setCurrent(playerGUI);
         * <p>Signals the MIDlet that it has entered the Active state.
        public void startApp()
            // Not implemented.
         * <p>Signals the MIDlet to stop and enter the Pause state.
        public void pauseApp()
            // Not implemented.
         * <p>Signals the MIDlet to terminate and enter the Destroyed state.
         * @param unconditional When set to true, the MIDlet must cleanup and release all
         * resources. Otherwise, the MIDlet may throw a MIDletStateChangeException to
         * indicate it does not want to be destroyed at this time.
        public void destroyApp(boolean unconditional)
            // Not implemented.
    }now keep in mind, I took this from a nice little example MIDlet called DemoMidlet inside the BlackBerry JDE
    so it's not like they didn't make an effort. I mean I pretty much took it out of their examples located in
    C:\Program Files\Research In Motion\BlackBerry JDE 4.6.0\samples\com\rim\samples\device\midletdemo
    but lets face it...some of us like to use the Canvas Class...so showing us how to use it with a Form not exactly helpful.
    All I did was the same thing it's just I made a canvas, and implemented the CommandListener, then swapped their form for my canvas.
    It freaking worked like a charm. I mean I didn't really use that alert stuff...as it wasn't necessary, but it's a nice demo to learn from.
    Part 2: The Escape Key!
    The first and only problem I noticed when porting over to the blackberry was the lack of certain keys
    that I truly enjoy and need. I guess blackberry decided to just not implement them
    into the MIDlet canvas class?
    I mean they did a great job at figuring out how to map the entire qwerty keyboard, but when it comes to the Escape Key
    good luck!
    So after tearing my hair out I found a solution...which i'm guessing everyone else also found but i'm posting this
    cuz well..what if you're tearing your hair out right now...calm down take a deep breaths this is currently working on the BB 9000
    jde emulator.
    First of all I know this sucks but if you want to use that lovely escape key you're going to have to implement the BB KeyListener.
    I know WTF MAN!? "first i code the whole thing using keylistener/commandlistener now I gotta use some stupid BB KEYLISTENER!?...just who does blackberry think they are?"
    well heres the thing, I tore my hair out for like 12 hours straight trying to get around this...but after giving it a rest it's not such a big deal.
    Steps
    1) you have to grab the blackberry net_rim_api, and add it to your wireless toolkit.
    the path is:
    C:\Program Files\Research In Motion\BlackBerry JDE 4.6.0\lib\net_rim_api.jar
    what I did was copied the file and pasted it into
    C:\WTK2.5.1\lib\ext
    once you have that inside your ext folder in your project settings you can enable the external package, this way you can build
    using the RIM API.
    in case you wanta take a glance at that headache it's : http://www.blackberry.com/developers/docs/4.5.0api/index.html
    to enable it simply open up wtk, go to project/settings/External API's and check it off...take note that the wtk 2.5 generally comes with
    Nokia SNAP Mobile API so i'm guessing it's a normal thing to do with MIDlets. Also if you check off Bundle..that's not too good it includes the API
    with your package...which is really only helpful if you're trying to include some of that junk which really isn't necessary as the reason we're doing this in the first
    place is cuz blackberry wanted to be cool and have their own proprietary keys....
    Anyways check that off and continue to step 2.
    Implementing Key Listener with the Canvas Class! :-)
    2) This part is so easy...
    import java.io.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.midlet.*;
    import net.rim.device.api.system.*;
    public class myCanvas extends Canvas implements CommandListener,KeyListener{
    String thekey = "no key pressed yet";
      public myCanvas() {
    Application.getApplication().addKeyListener(this);
    public void paint(Graphics g){
    g.setColor(255,255,255);
    g.fillRect(0,0,500,500);
    g.setColor(0,0,0);
    g.drawString(thekey,0,0,Graphics.TOP|Graphics.LEFT);
    public boolean keyDown(int keycode, int time)
                    thekey = String.valueOf(keycode);
                    repaint();
                return false;
            public boolean keyRepeat(int keycode, int time)
                 return false;
            public boolean keyStatus(int keycode, int time)
                  return false;
            public boolean keyUp(int keycode, int time)
                   return false;
      public boolean keyChar(char key, int status, int time) {
          if (key == Characters.ESCAPE)
             return false;
    public void commandAction(Command c, Displayable s)
      ///YOU DON'T NEED THIS! I just left it here, in case you wanted to also use the blackberry menu to do stuff...in this case
    //well the command is shown...and it calls the run method of the class you add the command to. My previous example
    // used the command GO, and i made a private class...so this would cause the run method to execute when the user hits enter on go.     
         // if ( c instanceof Runnable )
              //  ((Runnable)c).run();
    }i'm gonne be honest with you, the function public boolean keyChar()
    I don't know if that actually works...I just don't want to recompile without it cuz I just got over this headache..so I left it there.
    According to most people you use that to check if the key == Characters.ESCAPE and if it does then you do some stuff.
    Also you don't need the command listener, I just left it in there because well..if you're like me and you use the blackberry menu, you're pretty much
    going to use the CommandListener on your canvas to check to see if the user hit enter on a menu item.
    The function that matters here, is the same function Midlet coders are used to.
    instead of keyPressed it's simply keyDown
    so basically you're importing the package
    import net.rim.device.api.system.*;
    which allows you to implement blackberry's keyListener which gives you access to all the keys vs. a limited amount of them.
    now blackberry went all out as you can see. You have to have keyDown, keyUp, keyRepeated...it's kinda rediculous.
    but no worries, as long as you make sure that Display.setCurrent(yourcanvas);
    or you use one of those to give the canvas control...you'll be fine.
    It works because in the method for creating myCanvas()
    or whatever canvas you'll be using, it calls Application.getApplication.addKeyListener(this);
    and that little command gives your canvas the ability to listen for blackberry keys such as escape.
    the current code will start displaying the keycodes for each key...and apparently keys such as ESCAPE
    can be labeled properly. I love this because I can map the hang up call key to destroy my midlet, or even the escape key.
    Unfortunately every keycode displayed is in like unicode or some stupid format, so that's my guess as to why the Escape key is not detected by the normal
    canvas keyPressed method.
    Anyways you're done this should work...now if you're having trouble using canvas and you're like "but I don't use canvas" idk man...
    I use canvas...cuz I think programs should look cool. I'm sure this works without the canvas...on a form or something.
    But don't be fooled, you're not limited to KeyListener, you can also use TrackWheelEvent and all kinds of stuff. So just like the choices for CommandListener vs. keyPressed
    Blackberry has other choices as well.
    And they said merging the API's was a bad idea...shucks, how else are we supposed to use the freaking escape key.
    --JavaLover53
    P.S. I marked this as a question cuz I want people to really take a look at this. Make some comments, I love this forum
    and I really feel that this topic is not covered on the internet. A lot of naysayers, and when I found the solution I was like "that's it"
    "that's all I had to do?" "well then wheres the freaking tutorial!
    seriously people had me thinking I had to extend the blackberry UI when this is all I had to do..such an easy task
    that other people claim is ridiculously hard.
    Go ahead make your comments, lemme know if you know something I don't, i'm here to learn! :-)

    good writeup, however i found this only working when you're not running fullscreen

  • Urgent help!!! Server java and midlet

    Hi,
    I have write a simple java server that run on a pc.
    This waits for socket connection. I also write a midlet that connect cia socket connection to my server. The connection is established and the server say wellcome to my midlet and on the cell screen the message appears. After the midlet answers to the server hello but the server doesn't receive anything, nothing... I insert a println but the server stay blocked on the read on the DataInputStream. But the midlet says "I have send the message!"+answer.
    If someone say me that I can post the code I do it, but it's a bit long.
    Help!!!!!!

    Yes, to be sure data is really send, you'll need to call flush, preferably on server and client. You can do this after every complete block of data, so not nedded after every write.

  • Forte and MIDlet - how do you keep Forte from seeing J2SE classes?

    I am developing MIDlets with Forte; I have created a new MIDlet within a MIDlet suite, using the HelloWorld template.
    However Forte lets me use any old class in my code, not just the MIDP classes. For example, if I write a
    Float f = new Float();
    line in my code, Forte will compile without batting an eyelid, even though there is no Float class in MIDP.
    How can I keep Forte from accepting the use of J2SE classes when compiling MIDlets?
    Thanks

    OK, fixed - here's what I did:
    - I went to Project/Settings/Compiler Types and I moved the J2ME Wireless Internal Compilation on top of the list
    - then to Project/Settings/J2ME Wireless Settings and make sure that the J2ME Wireless Internal Compilation was the default compiler
    - then Project/Settings/Java Sources/Default compiler and set the compiler again
    -then I went to Tools/Global Options/J2ME Wireless Options and set "Check default compiler" to false
    Now it works!Perhaps there are useless/contradictory steps in there, but at least now my code is only compiled against MIDP classes and not J2SE classes.

  • XML and MIDlet

    Hi all,
    Can somebody help me to give the tutorial about building XML using servlet ?
    I need an servlet which can generate XML before send it back to the client (in this case I use MIDlet as the client).
    So far I use kXML as the parser, and it works.
    I don�t think to use XSL because the target is not HTML based or web page.
    Thank You,
    Best Regards,
    CHi

    ichiwan wrote:
    all of those links are using XSLT or DOM approach.
    I want the similar tutorial but without involving XSLT or DOM.
    In other words, only pure servlet that able to generate xml tagsWell that is simple to do.. If u know writing servlets and know about xml typos, just use that knowldge to generate your xml file.
    What u need to do is in your response u have to write the xml data. This is how...
            response.setContentType ("text/xml;charset=UTF-8");
            PrintWriter out = response.getWriter ();
            out.println ("<?xml version="1.0" encoding="ISO-8859-1"?>");
            out.println ("<CATALOG>");
            for (int i=0; i<dataVector0.size(); i++) {
                    out.println ("<CD>");
                    out.println ("<TITLE>"+dataVector0.elementAt (i)+"</TITLE>");
                    out.println ("<ARTIST>"+dataVector1.elementAt (i)+"</ARTIST>");
                    out.println ("<COUNTRY>"+dataVector2.elementAt (i)+"</COUNTRY>");
                    out.println ("<COMPANY>"+dataVector3.elementAt (i)+"</COMPANY>");
                    out.println ("<PRICE>"+dataVector4.elementAt (i)+"</PRICE>");
                    out.println ("<YEAR>"+dataVector5.elementAt (i)+"</YEAR>");
                    out.println ("</CD>");
            out.println ("</CATALOG>");
            out.close ();You should have corresponding data in the Vectors dataVector0 thru dataVector5... The resulting response will look something like >> http://www.w3schools.com/xml/cd_catalog.xml
    Hope this helps...
    SD+

  • Conduits And MIDlets

    I have a MIDlet which creates a database on a PDA and am trying to get the Information from the PDA into a Database using the Conduit development Kit and I have a few questions
    1) What exactly is put in the remote database field a)the name you created the database with(student) b)the name that appears in the backup folder on the PC(student-VM01) or c)The name of the program
    2) What is put in the class path field?
    3) which is the best(easiest) of the sample MIDlet to expand from to get this project going?
    4) Any good examples of conduits on the net?And their web sites?
    Thanx

    I have a MIDlet which creates a database on a PDA and
    am trying to get the Information from the PDA into a
    Database using the Conduit development Kit and I have
    a few questions
    1) What exactly is put in the remote database field
    a)the name you created the database with(student)
    b)the name that appears in the backup folder on the
    PC(student-VM01) or c)The name of the program
    2) What is put in the class path field?
    3) which is the best(easiest) of the sample MIDlet to
    expand from to get this project going?
    4) Any good examples of conduits on the net?And their
    web sites?
    ThanxI'd like to get those answers too.

  • Cldc and cdc compatibility

    help me in this
    An application deveoped in cldc/midp environment,will it run in cdc/personal profile environment
    Thanks in advance

    Hi,
    I would say yes, in Next Generation Java in Nokia platforms !
    There's a presentation about Next Generation Java in Nokia platforms given in a Forum Nokia Tech Days event last year in August. ( http://www.forum.nokia.com/info/sw.nokia.com/id/792e74ea-faf9-4ea0-8c38-840e799d628c/Next_Generation_Java_Tech_Days_Aug_2005.pdf.html ).
    There is a picture in this slide, were they have MIDP on top of CDC.
    I have this picture in my blog: http://ovenordstrom.blogspot.com/2006/03/is-j2mepersonal-profile-dead-java.html
    -ove

  • ClDC and MIDP apllication with images?

    hi...
    I am using NetBeans for developing mobile application. I am facing some problem in emdedding high resolution images in it. After inserting those images i can brows them only up and down not horrizontally. Can any one help me??? i wouls also like to zoom in and zoom out the images. Plz help me.....

    u have to write code for scrolling it horizontally
    vertical scroll gets automatically implemented
    else u can resize the image and upload
    or u can write code to fit the image on the screen

  • Cldc and midp

    hi.. am new in j2me.i am doing a project in j2me.Is it possible to retrieve data from a text file and bind in to choice or list box ?

    if you can use io package, the easiest thing would be to use InputStream to get the file binary, then use InputStreamReader to get the content. you then just parse the bytes using the reader and you can convert it into whatever format you needed it for.

  • How to run cldc(j2me)

    i am new in j2me and what are the tools are nessary and and how to run cldc and midlet and wirelless toolkit
    please answer my question its rather urgent
    senthil

    create new project after that in system where you created a project go to created project open it you will see build ,dist,nbproject these there folders will be init beside that you create folder of src and place a j2me code files in it and open netbeans from there open project which yu created then click on build run above toolbar in netbeans

Maybe you are looking for