J2me textField plz Help Me

hello to all
i am using textField for user input and i want to remove this text field from that form and after i want to add some another inputs like choice group on that form so i want to remove textField and add a choice group.
we can a remove choicegroup field from form like(form.delete(choicegroupName))
but as same type we can not remove a textField item.
i use coding for delete a textField form.delete(typeOfCar);
it is giving error
delete(int) in javax.microedition.lcdui.Form cannot be applied to (javax.microedition.lcdui.TextField form.delete(typeOfCar);
sir plz help me

just when adding the TextField to the form call it like
int textFieldPos = form.add(textField);
this saves the index of this Textfield in the textFieldPos variable. This can be used to remove this component, by calling
form.delete(textFieldPos).
hth
Kay

Similar Messages

  • Plz help me in j2me programming

    Hello friend,
    I am making progress bar in j2me which is made by Gauge class.
    here iam fetching data from jsp page..in between all data process and come on to mobile screen i want to show progress bar on screen..plz help me how can i bind my process with Gauge..
    if u understand me plzz try to solve my problem...
    Thanks in advence
    Aman Gautam

    As this FS seems to be for lingerie company "Victoria's Secret" could points be converted to underwear instead of t-shirts?
    Tip: If you're going to post an entire spec you may want to remove the customer's name first.

  • J2Me game programming plz help

    Helo everyone,
    I am working in j2me game programming plz if
    any one know how make image as small as possible
    in our game program.?
    I am using *.png format of image which is working well
    in game but my game size is very big so plz help me to get
    out of this problem
    Thank u
    Aman Gautam

    I solved the same problem by using indexed color images instead of true color.
    So, for example, if you have a colorful background you can convert it to a 256 color image.
    Depending on your specific image and the devices you'll see it on you may or may not notice the difference, but the file size is generally smaller.
    Then you can push further for smaller elements, like, say, a moving object like a pointer or a starship, you can reduce it to 60 or 30 colors, or even less.
    Another technique is to use tiles to build up the background instead of big images. With MIDP2.0 there's the TiledLayer, but you can implement the same with some code also on MIDP1.0 if backward compatibility is of concern.

  • How do i pass parameters from j2me to jsp?plz help

    hi everyone...
    i m doing my final year project
    can anyone plz tell me how to pass parameters like user name,password,etc.. from a j2me midlet to a jsp page running in tomcat server?
    i tried passing parameters in http connection through url as:
    String url="http://localhost:8080/example/test.jsp?name=abc";
    i need this info urgently as i am not able to proceed with my project... plz help
    any suggestions or references would be appreciated...
    thank u...
    regards,
    Rinzi

    JHD
    hi.
    you have written in URL i sperfectly right but if this is also not complete one.
    i.e url = "http://localhost:8080/dir/xxx.jsp?userName=jasmit&password=vala"
    now when u establishing connection i.e
    HttpConnection con = (HttpConnection) Connector.open(url,3);
    this will work as an declaration but if u want to send that parameter for that you have to get response from the server and that time only original connection is going to establish i.e
    when u r writting
    int responseCode = con.getResponseCode();
    if(reponseCode == 200)
    then ur parameter were passed to jsp page.
    in jsp page u have to get parameter using request class
    String userName = request.getParameter("userName").toString();
    String password = request.getParameter("password").toString();
    i hope this might solve ur problem.
    Regards,
    Jasmit vala
    [email protected]

  • ** Plz help me in displaying unicode character **

    Hi,
    I hava a problem with the following code. Actually I want to display some arabic character with the help of unicode. Plz go through the following code.
    import java.awt.*;
    class Unicode extends Frame
    public static void main(String args[])
    Frame f = new Frame("Unicode");
    f.setSize(200,200);
    String str="\u0600";
    TextField tf=new TextField(str);
    f.add(tf);
    f.setVisible(true);
    I m trying to print that character on a textfield. However, this is not the requirement but for only testig purpose. I get the character '?' in the resulting textfield. plz tell me that how can I use unicode to print other languages character anywhere like on awt, swing or in html. plz reply soon . Thanks
    Fahad Ahmed

    \u0600 is an unassigned Unicode character, so there's no way to do that. However I assume you mean you want to display Arabic characters such as \u0627, Arabic Letter Alef (&#x0627). Then you need to find a font that can render those characters properly, and assign that font to the TextField using its setFont() method.
    I notice you are using AWT, which probably means you are trying to do this in an applet. If that's the case then "find a font and use it" is going to be a big problem, because you don't know what fonts your clients' computers have available.

  • Using InputMap and ActionMap to detect any key pressed...plz help

    Hi,
    I am quite new to Java. I have a tiny problem. I wanna put an actionlistener into a JTextField, so it printout something whenever a key is pressed (when the textField is selected).
    I can only get it to print if I assign a specific key to pressed...example below (works):
    JTextField searchBox = new JTextField();
    InputMap imap = searchBox.getInputMap();
    ActionMap amap = searchBox.getActionMap();
    imap.put(KeyStroke.getKeyStroke(KeyEvent.VK_A, 0), "pressed");
    amap.put("pressed", new AbstractAction() {
              public void actionPerformed(ActionEvent e) {
                   System.out.println("TYPEEEEEEEEEEEEEEE");
    HOWEVER, when i change keystroke to any key pressed, it doesn't work. Example below(doesn't work):
    JTextField searchBox = new JTextField();
    InputMap imap = searchBox.getInputMap();
    ActionMap amap = searchBox.getActionMap();
    imap.put(KeyStroke.getKeyStroke(KeyEvent.KEY_PRESSED, 0), "pressed");
    amap.put("pressed", new AbstractAction() {
              public void actionPerformed(ActionEvent e) {
                   System.out.println("TYPEEEEEEEEEEEEEEE");
    Somebody plz helps me. I am really confused how to use KeyEvent.KEY_PRESSED. I thought it would work the same way as KeyEvent.VK_A...if i can't use KEY_PRESSED for that purpose, what KeyEvent do I use?
    Thank you very much in advance.

    Sounds like you want a KeyListener.
    textField.addKeyListener(new KeyListener() {
        public void keyTyped(KeyEvent e) {
            System.out.println("Key typed.");
        public void keyPressed(KeyEvent e) {
            System.out.println("Key pressed.");
        public void keyReleased(KeyEvent e) {
            System.out.println("Key released.");
    });See the API documentation for more information.

  • Plz help me to get Projects for Practice

    hi,
         I am vijay recently completed SAP In SD module.Plz help me to get projects for practice

    if you want to put am image into a game use this code:
    try {
    Image Img = Image.createImage("/your.png");
    catch(Exception e) {
    You have to have a try/catch statment to check for errors.
    You can have animated png with sprites.
    If you have a picture thats 32x32 put the next frame into it 32x64 and continue like that.
    I added a link to a good guide to make game in J2ME
    http://www.microjava.com/articles/techtalk/midp2_games?PageNo=1

  • Plz help me about clustering and loadbalancing

    hi all
    plz help me about clustering and loadbalancing
    how to do clustering and loadbalancing in tomcat ?

    I used Grid Bag Layout for allignment of all buttons and textfields.Use multiple different nested layout managers to get the desired layout.
    Give it another try.
    If you need further help then you need to create a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://homepage1.nifty.com/algafield/sscce.html], that demonstrates the incorrect behaviour.
    Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area.

  • Plz help with me gui problem(arraylist)

    my program
    stocksymbol ------------------ stockname ------------------ enter
    (label) (textfield) (label) (textfield) (button)
    create a gui application using jframe and jpanel so that user can enter stock details(symbol,name) when user press "enter(button)" the text entered in the textfield should be add to an arraylist.
    when we close the window ,we have to print the items present in the arraylist....
    i have created all the components but iam getting difficult in display the arraylist when i close the window
    i have created these classes
    public class Stock {?}
    public class StockEntryFrame extends JFrame {
    // code to allow the frame to handle a window closing event ? when the window is closed,
    // the stock list should be printed. ?
    public class StockEntryPanel extends JPanel {
    public StockEntryPanel(ArrayList<Stock> stockList) {
    can u plz help me how to diplay the contents in arraylist

    MY PROGRAM IS LIKE THIS:::::::::
    STOCKNAME-----------
    STOCKSYMBOL---------
    STOCK PRICE--------
    ENTER(BUTTON)
    WHEN USER ENTERS HIS INPUT IN THE TEXT BOX AND PRESS ENTER, THEN THE TEXT PRESENT IN THE TEXTBOX SHOULD BE ENTERED INTO AN ARRAYLIST.
    THIS IS A GUI PROGRAM......
    WHEN WE CLOSE THE FRAME ,WE HAVE TO DISPLAY THE CONTENTS PRESENT IN THE ARRAYLIST
    I HAVE CREATED THE PROGRAM LIKE THIS
    CLASS STOCKENTRYPANEL EXTENDS JPANEL
    //ADDING ALL THE COMPONETNS TO THE PANEL
    CLASS STOCKENTRY FRAME EXTENDS JFRAME
    //ADDING PANEL TO THE FRAME
    //I NEED THE CODE HERE
    WHEN WE CLOSE THE WINDOW THE ARRAYLIST DETAILS SHOULD BE PRINTED
    }

  • JRadioButton actionListener shows troble.plz help.

    hai forum,
    My project has a part where i select a class file,display its methods and then display JTextFields for the parameters of the method in a separate panel.
    My problem is that clicking different radio buttons(methods) do not bring about a change in the panel.
    my code for selecting and displaying method is
            public void selectClass_actionPerformed(ActionEvent e)
                if(e.getSource()==selectClass)
                    //refresh panel
                    methodPanel.removeAll();
                    methodPanel.revalidate();
                    //  Code To Generate a FileChooser
                     //instantiate class FilterClass
                    JFileChooser jfilechooser=new JFileChooser();
                    Filterclass filter=new Filterclass();
                    //Set selection mode for file chooser
                    jfilechooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
                    //set file filter
                    jfilechooser.setFileFilter(filter);
                    int returnVal = jfilechooser.showOpenDialog(this);
                    if(returnVal == JFileChooser.APPROVE_OPTION)
                        try
                                String str = jfilechooser.getSelectedFile().getName();
                                String parent=jfilechooser.getSelectedFile().getParent();
                                classFileList.addItem(str);
                                classFileList.disable();
                                // Create a File object on the root of the directory containing the class file
                                File file = new File(parent);
                                // Convert File to a URL
                                URL url = file.toURL();         
                                URL[] urls = new URL[]{url};
                                // Create a new class loader with the directory
                                ClassLoader cl = new URLClassLoader(urls);
                                StringTokenizer st = new StringTokenizer(str,".");
                                String s = st.nextToken ();
                                 Class c = cl.loadClass(s);
                                //Get the Methods Of the Selected Path
                                Method methods[]=c.getDeclaredMethods();
                                for(int i=0;i<methods.length;i++)
                                    int modifiers=methods.getModifiers();
    if(Modifier.isPublic(modifiers)||Modifier.isStatic(modifiers))
    String a= "";
    a=methods[i].getName();
    //Get the Parameters
    Class[] parameterTypes=methods[i].getParameterTypes();
    String parameterString = "";
    for(int k=0;k<parameterTypes.length;k++)
    if(k==0)
    parameterString = parameterTypes[k].getName();
    else
    parameterString = parameterString+","+parameterTypes[k].getName();
    parameterCount = parameterTypes.length;
    System.out.println("num of para"+parameterCount);
    /*Create RadioButton Dynamically*/
    String radioName=a+"("+parameterString+")";
    j=new JRadioButton(radioName);
    methodPanel.add(j,true);
    methodlistPane.getViewport().add(methodPanel,null);
    j.setBounds(100,(100+(i*50)),100,50);
    group.add(j);
    //Class methodradioactionlistener implemented below
    j.addActionListener(new MethodRadioActionListener());
    }//end of if loop
    }//end of for loop
    }//end of try loop
    catch(Exception e1)
    StringWriter sw = new StringWriter();
    e1.printStackTrace(new PrintWriter(sw));
    String stacktrace = sw.toString();
    System.out.println("stacktrace = " + stacktrace);
    }//end of catch loop
    }//end of if loop
    }//end of e.getsource loop
    }//end of method loop
    And my MethodRadioActionListener is
            private class MethodRadioActionListener implements ActionListener
                public void actionPerformed(ActionEvent e1)
                        if(parameterCount==0)
                            textfieldPanel.removeAll();
                            textfieldPanel.repaint(); 
                            JLabel nopara = new JLabel();
                            nopara.setText("NULL PARAMETER");
                            nopara.setBounds(new Rectangle(210, 80, 175, 25));
                            textfieldPanel.add(nopara);
                            textFieldPane.getViewport().add(textfieldPanel,null);
                        } //END OF IF LOOP
                        else if(parameterCount>0)
                            textfieldPanel.removeAll();
                            textfieldPanel.repaint();
                            tf = new JTextField[parameterCount];
                            for(int j = 0; j < tf.length; j++)
                                //DISPLAYS TEXT FIELDS
                                tf[j] =new JTextField(null,5);
                                textfieldPanel.add(tf[j],true);
                                tf[j].setBounds((100+(j*100)),100,100,10);
                                textFieldPane.getViewport().add(textfieldPanel,null);
                            } //END OF FOR LOOP
                        } //END OF ELSE IF LOOP
                } //END OF ACTION PERFORMED METHOD
             } //END OF CLASS
             Clicking the radio button do not bring about any change.A single textfield is generated always.
    Plz help me fix my mistake.
    Thank you.

    Yes, as you mentioned only one action is being done that is of the last method.I tried bringing the code ,ParameterCount=k; ,inside for loop so that it takes thenumber of parameters of only one method that i select.But still i find the same kind of action takes place.
    Is there any other way out to solve my problem?How can i get the parameterCount of only one single method?
    Is it advisable to write the radioButton actionPerformed method inside the actionPerformed method for selectClass menuItem, rather than as a separate class.
    Thank you

  • Error while opening a module. plz help me, very urgent.

    when i try to open a module, the following error message appears on my screen.
              " no j2ee component found in d:\krisp\programs\servlets".
              i've installed bea in c: drive and my servlet program is in d: drive.
              plz help me, it's very urgent.

    Can you provide some more information? What were you doing when this happened?
              Can you post the entire error message?
              -- Rob
              WLS Blog http://dev2dev.bea.com/blog/rwoollen/

  • Hi when i open my application folder, all the application is shown in trash folder. when i click the application it says this app is in trash first move it out. and when i try to open through finder go it says this file doesn't exist. can some1 plz help?

    hi when i open my application folder, all the application is shown in trash folder. when i click the application it says this app is in trash first move it out. and when i try to open through finder> go it says this file doesn't exist. can some1 plz help? how can i put all my application through application folder?

    Something really odd is going on. In your first screen shot, I noticed that the Applications folder does not have the proper icon displayed in the side bar. Also, in the title bar it lists it as Applications 08-59-29-909.
    Not sure where it's picking up that odd name, unless it's because it's still truly within the Trash folder.
    Try this. In the Finder > Preferences > General > turn on "Always open folders in a new window". (I have a feeling you have the default setting with this off).
    Now, in Finder > Go > move down and open the Applications Folder from there. Now open the folder where you see all your applications that you show in your screen shot, select all, and move them to this true appliactions folder.
    This is what you should properly seeing (but with different apps listed):
    See how the Applications folder has the icon of the letter A shaped with a pencil, ruler & pen.

  • How to select the download location? its automatically downloading to users folder in c drive. i wanna change it..plz help me out......

    how to select the download location? its automatically downloading to users folder in c drive.. i wanna change to my desktop...plz help me out...

    Tools -> Options -> Save files to -> Click browse button and browse for folder where you want to save the file.

  • How to print text/data in flex 3 using printer???Plz help...

       Hi,
              plz tell me the way to print text/data using printer in flex.  I tried the FlexPrintJob class. but it takes object of a container to be printed & prints the visible content of that container(along with scrollbars), bt i want to print all contents of the container(including invisible).
          I have tried to print bitmap image through FlexPrintJob but it takes lot of time for spooling... So plz help me out in printing(fast with all content) in flash
    I am using flex 3 (flex Builder 3 IDE).
      Thanks in advance!!!

    Hi Sagar,
    Don't worry You can use the below work around to print all the contents of the Container including the invisible contents under scrolll with out scroll bar..
    So what the idea here is we are seeting the container height to full size with out scrolls before sending the container object to printer and as soon as you print the object you are restoring it to the original height with scrolls...so that you can print the full contents without scrolls...
    You may have doubt that by chnaging and restoring the size the user may see momentary resize of the container but it is not so as it is a fraction of a second and user cannot notice this change... Give it a try ..I had already run into this problem recently and I have found a work around for this which is as below:
    // Here mainContainer is the container or box id the contents of which you want to print
       private function doPrintContainer():void
        var printJob:FlexPrintJob = new FlexPrintJob();
        if(printJob.start() != true) return;
        try
         var mainContainerHeight:int = mainContainer.height;
         //Increasing the height of the desired component to be printed.
         mainContainer.height = mainContainer.measuredMinHeight;
         mainContainer.verticalScrollPolicy = "off";
         //Adding the resized Component to our FlexPrintjob and then sending the print request
         printJob.addObject(this,FlexPrintJobScaleType.MATCH_WIDTH);    
         printJob.send();
         //Resizing the component back to normal size
         mainContainer.height = mainContainerHeight;
         mainContainer.verticalScrollPolicy = "auto";    
        catch(error:Error)
                     trace("Error : " + error.message);
    If this post answers your question or helps, please kindly mark it as such.
    Thanks,
    Bhasker Chari

  • My ipod touch 5th generation wont download apps and let m e use them!!! Plz Help me fast!

    I have an i pod touch 5 and I try to download a new app from the app store so i goto the app store and click download then click it again to install it and it installs but it dont leave an app icon on the home page so i go back to the app store and it says open in a ble box so i click open and it dont open it just keeps saying open and it wont open! please help me!!!!!!!!!!!

    I ment blue not ble sorry but plz help!

Maybe you are looking for

  • No data found error on Form on a Table with report

    Hi Everyone, I'm using Application Express 4.1.0.00.32 on Windows 7. I built a Form on a table with report. Earlier I was using rowid as a passing parameter but then I had to change it to primary key column from report to form. So in the "Fetch row p

  • Dealing with dropped frames and out of sync audio

    Hi! I'm using Final Cut Studio 3 and I'm trying to record some video from a pretty old MiniDV-camera. The problem is that a have some dropped frames and when I record the whole thing it gets out of sync. By default Final Cut aborts the capture (witho

  • Regarding ALV report to output in excel

    How to do  ALV report to output in excel format?

  • Photo booth problems

    I just recently had my logic board replaced bc my battery wasn't getting recognized and wouldn't charge...the battery issue is fixed now but i tried using photobooth and a blank green screen just comes up with no picture...any ideas what this problem

  • Export to MS Access in background job

    Hi, is it possible in ABAP to export data to MS Access file (.mdb) in background job? We have an idea to run external program in RFC mode in .NET - but it requires to have WIndows installed on external machine which is not good. /BR / Thank you