Searching Example in java MIDlet App

Hello All, i am working on an assignment and one of the part of this assignment is to perform a search,
The user should be able to list all the details of all ITEMS that have been added to the order.
In addition to listing all the ITEMS , the user should also be able to search for ITEMS by name. At its simplest this could mean entering a name and displaying the first order that matches, though ideally the user should be able to enter the first few letters of the name and display all matching ITEMS or even list all the ITEMS where the search string matches any part of the name.
Can anyone please give me some peace of code to perform this seaching, i'll be so greatful...
Thanks.

Can anyone please give me some peace of codeNo. This is a forum, not a free code factory.
[_How to ask questions the smart way_|http://catb.org/~esr/faqs/smart-questions.html]
db

Similar Messages

  • How to use URL class to execute a java class/app  on a remote machine?

    I am a beginner in Java networking and have a question about URL programming.
    How do I pass parameters to a java class/application over the web and then cause it to execute ? I then want to get the result back from the clas/app. The class/app resides on a remote machine and the protocol used is "http" protocol. OR all this is not possible through the URL and related classes ?

    How do I pass parameters to a java class/application over the web and then cause it to execute ? Using the HTTP protocl you can either perform a GET where the parameters are in the URL or a POST where the data is sent to the server with the request.
    The server must be setup as a web server to execute code based ojn a HTTP request. Using a web server with a JSP which contains the code to execute is the simplest way to do this.
    I then want to get the result back from the clas/app. The output of the JSP becomes in the data returned by the HTTP request.
    I would suggest looking for example on google.
    http://www.google.co.uk/search?q=java+http+request+tutorial
    Another option is to use RMI. The integration is tighter but it does not use the HTTP protocol.

  • Search results not showing certain apps in appstore!!??

    Hello, When I search for a certain app/game in the app store on my ipad, it does not come up in the results..
    Have encountered this several times so far, who knows how long it has been like this..
    PLEASE help?
    I have done  the simple little obvious things, like closing app store, going back in, signing in and out, soft reset, checking the settings. I contacted customer support but the agent was unable to assist me, said I should call, I hate calling tech support so...
    I would really hate to do a hard reset as I have a lot of stuff on there.. IF as a last resort  I have to, would backing up my ipad in the iTunes store on the computer save my SAVE-GAME data?
    And would a hard reset for sure fix the problem..?
    Thanks in advance.
    US ipad 2, ios 7.0.3

    It could very well be that the app you are searching for on your iPad is one of those that is only compatible with the iPhone.
    For example, I just did an App Store search for an iPad *only* app (iSEM Oberheim synthesizer) that I have installed on all of my iPads...I performed the search on my iPhone 5 and got no results on that particular app...a few other apps came up in the search but they had nothing at all to do with the app in question.
    Another thing to check is if the app is indeed still available in the App Store. To verify, I'd search the App Store in iTunes on the Mac or PC...older apps especially get pulled frequently along with apps that maybe somehow violated a copyright issue or an app that the developer wanted pulled for some reason.
    Also, a reset (as outlined below) won't affect your data if you'd like to try it.
    Device Reset (won't affect settings/data/music/apps/etc)
    1. Press and hold (& continue to hold) BOTH the Sleep/Wake button & the Home button.
    2. Continue to hold BOTH (ignoring any other messages that may show) until you see the Apple logo on the screen.
    3. Release BOTH buttons when you see the Apple logo and allow the device to boot normally.

  • Deploying Java Desktop App using executable JAR files

    Hi there.
    Today I am very optimistic about java. I am a beginner, and I had tried (in my few free time) to understand how to deploy java desktop apps.
    I am using the lattest NetBeans IDE to do the programming and it is very very fast and optimized.
    Going to the point, I tried some time ago to deploy an application (made with this IDE) using JAR files, but even though the application run well on my IDE, when I packed it, it rised an error saying that
    java.lang.NoClassDefFoundError: org/netbeans/lib/awtextra/AbsoluteLayout
    I was using an absolute layout on my JFrame forms and this AbsoluteLayout is provided by netbeans and not by the normal SDK.
    I then looked for the absolute layout class and found a jar file in the following path:
    C:\netbeans\modules\ext\AbsoluteLayout.jar
    So I mounted the Jar file in my File Systems and then added the contents of the file to myApp.Jar file.
    I used the automated Jar Recipe Packaging feature of netbeans, that is why I needed to mount the AbsoluteLayout.jar file into my file systems.
    Now it runs fine by just right clicking the MyApp.jar file from Windows Explorer.
    In a next reply to this topic I will include some sample code so that anybody requiring to do such implementation can take this for help.
    Regards!
    JN

    Well,
    I will take some time here to show the basic source code and procedure to create a desktop application, pack it up in a Jar file for deployment, add other classes or jars to the deployment jar file and finally open the jar file as an executable. This applies for either windows and linux environments.
    Take in count i am using Netbeans IDE 3.x (3.5)
    First I open the IDE and create a new project called MyDesktopApp. This is done by going to the menu Project / Project Manager. Then click on the New button and specify the project name and click on OK.
    At this point, the Filesystems tab in the project explorer is empty. So I mount a directory to store myDesktopApp in it. I selected c:\MyDesktopApp but you can select any name you want.
    To mount the directory you follow these steps:
    1. Right-click on File Systems
    2. From the contextual menu select Mount > Local Directory
    3. In the filechooser window, you just browse it and SELECT the directory to mount. Be aware that you can even create the directory on this window. Do not enter (double-click) into the directory you want to mount, just select it and click on finish...
    4.Then the directory entry appears under the filesystems node of the project explorer.
    Now you have to create your application. You can either create a package (special configured and tracked directory) or you can create the clases directly inside the directory. For tidy project, I will create the package.
    To create the package follow these instructions:
    1. Right-click on the mounted directory and from the contextual menu select New > Java Package
    2. In the New Wizard - Java Package window, type the package name and click on finish. I use the "MyDesktopApp" as package name.
    OK. Now the package is created under the mounted directory. Now we have to create the Main Class. In this case I will use a JFRAME as the main class but you can create any class you want.
    To create the JFRAME as main class follow these steps:
    1. Right click on the java package you just created and select New>JFRAME from the contextual menu. If you do not see the JFRAME option on the NEW sub menu you will have to select the All Templates option. I explain the All Templates option now on, it will be easier to use the JFRAME if available. Once you use JFRAME with the all templates then the JFRAME will show up in further NEW usage.
    2. So finally we used the All Templates, and you select the Java GUI Forms > JFRAME form option and click on NEXT.
    3. Give it a name. (I used MyDesktopAppFrm) and click on finish. Be aware you can set advanced options by clicking on next. But for the purposes of this topic we will use default options so click on FINISH
    4. A new JFRAME form appears inside your package. Right click on the form and select Set layout > Absolute Layout.
    5. Add some controls and code. I added a label and a button. And coded the ActionPerformed event of the button to say hello! on the label. this is up to you. The code just looks as follows:
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
    // Add your handling code here:
    jLabel1.setText("Hello folks!");
    6. Compile and execute the form.
    Let's say this is our Desktop Application. Now We will pack it in a Jar in two steps...
    A. Create a JAR file (Recipe)
    1. Right-click on your package and select New > All Tempaltes (Long Route) You can also select New > JAR Recipe if available.
    2. On the New Wizard Window, choose the JAR ARchives > JAR Recipe template and click on NEXT
    3. I used MyDesktopApp as the file name and Defaults and then click on Next.
    4. Specify the JAR Contents. Select the Package (not the mounted folder) from the mounted file system and click on add and then click on NEXT twice...
    5. On the JAR Manifest window, click on GENERATE
    6. Edit the manifest in the window to add the following code:
    Main-Class: MyDesktopApp.MyDesktopAppFrm
    7. Ensure the Main-Class definition is the same as your java package and JFRAME name. Click on FINISH
    8. At this point we have a jar file in your project directory but this file wont run because it is missing some Netbeans clases that we will add in the next set of steps... Just to check, compile the file (right click on the JAR file and compile) and try to execute. It must compile but must not execute.(well if it executes you are done. It may execute if you did not set the lay out of the form as AbsoluteLayout)
    B. Add the AbsoluteLayOut to the JAR
    1. Right click on File Systems and select Mount > Archive Files
    2. Look for your netbeans installation folder and select the following file:
    .../netbeans/modules/ext/AbsoluteLayout.jar
    3. Click on finish
    4. Now the JAR File is mounted in the file systems.
    5. Right-click on your MyDesktopApp.JAR file and select properties.
    6. Look for the contents property click once on it and then on its elipsis button [...]
    7. From the FileSystems box in the Contents window, select the AbsoluteLayOut file and click on Add
    8. Then the system asks you if you are sure. Of course you are so click OK. (If not sure, just read the message text and click OK...:-))
    9. Click on OK
    10. Compile your JAR Recipe (right click on it and Compile)
    11. Now you must be able to run the file by right clicking it and EXECUTE.
    12. Also you must be able to run the file by double clicking the file from a Windows Explorer. You may receive a message asking to select the program to run the file with. You must browse and select the Javaw.exe file in the bin directory of your Java RUn Time installation. This is typically located at C:\j2sdk1.4.0_01\jre\bin or something like that. Use the File-Search feature of window to locate the JAVAW.exe file if needed.
    I hope this long explanation helps somebody to deploy Java Desktop applications. Please reply the message if it helps you just to know it was useful.
    Thanks for your time....
    JN

  • ASP/COM to be converted into a Java/WebLogic app

    Does anyone know if there is any methodology to convert an ASP/COM (microsoft)
    app into a Java J2EE app like Weblogic ?
    Please advise
    Thanks a million
    KK

    Hi.
    I'm unaware of any specific methodology. In order to save yourself some coding
    you might take a look at a java-com bridge such as the JCOM bridge we have in beta
    or some similar 3rd party product. This will allow you to keep and use some of
    your existing COM objects. You might also search the web to see if there are any
    tools that help you to convert from ASP to JSP.
    Regards,
    Michael
    Kubo Kushi wrote:
    Does anyone know if there is any methodology to convert an ASP/COM (microsoft)
    app into a Java J2EE app like Weblogic ?
    Please advise
    Thanks a million
    KK--
    Michael Young
    Developer Relations Engineer
    BEA Support

  • JAVA / SWING apps, font AA / LaF KDE 4.3

    Hi Everyone,
    I know the title is terrible, but here is my problem:
    I am using Netbeans for most of my development projects. I am very happy with it; however, the look and feel of Netbeans (and most other Java apps, such as FreeMind for example) is appalling and does not integrate into my KDE 4.3 desktop at all. I understand that you can start netbeans with certain options to change the look and feel to GTK, but the fonts still look jagged.
    I followed this forum post http://bbs.archlinux.org/viewtopic.php?id=72892 and tried to set the JRE / JAVA options globally, so that all java apps start with GTK laf and AA. However, non of the methods described work / netbeans overrides them (?).
    But really, the biggest problem are the ugly fonts. Java / SWING apps do not seem to recognize my KDE settings for AA and font style at all. And non of the Cl options work to fix it.
    Does anyone have any tips or tricks to fix any of these issues I am having with the combination Java / Swing / KDE / NB?
    Running:
    Archlinux (duh)
    KDE 4.3 / qt-gtk-engine
    sun-jdk 1.6uX
    Netbeans 6.7.1
    Thanks!
    KnY

    I added what I knew about improving Sun java fonts to the wiki:  http://wiki.archlinux.org/index.php/Jav … _-_Sun_JRE.  You may want to try other fonts than B&H's Lucida.  See the section in the wiki article about changing the default fonts by editing 'fontconfig.properties'.

  • Java midlets: "Unable to install"

    I installed the official Live Messenger Java midlet client from my network 3 Ireland on E51. However I decided to delete it again, since it was slow and did not login properly to my account.
    After this uninstall the problems started: I tried to install another midlet, and after about 90pc of the installation, it said "Unable to install". Native apps work fine to install though.
    Anyone else had this problem?
    If I take out the memory card, I can install midlets to the phone memory, but with the card in, no installations are possible, not even to phone memory.
    Lucky I had a backup of my files on my old 8gb memory card, so I just formatted the 16gb memory card and fired on all the files again.
    I don't think this has anything to do with the new 16gb memory card, since it has worked fine for a month.
    Where could the problem lie?

    98SE is supported. See configuration requirements for the various versions.
    Try downloading Java and installing it, then go to the NetBeans site and downloading it and installing separately.

  • Good example of  Java Classpath

    I am very much confused in learning about classpath in Java.
    Could anyone of you explain it.
    or
    Refer me to some website where I can have a clear understanding of classpath as well as
    master it by practicing a good example.
    I searched for it for a long period of time. I just found some theory saying you can do this do that
    with classpath but not practical example.
    Help me out in this.
    Thanks in Advance.

    I don't know what you've read, and I don't know what you didn't understand about it, so I have no idea what to say or suggest to you, other than start here:
    [http://www.google.com/search?q=java+classpath+tutorial]
    It's really not a complicated concept, so "mastering" it doesn't mean much. You either understand it or you don't.

  • JMainFrames and Java 3D Apps

    Hi,
    I have a swing application. The event associated with a particular JButton creates an instance of two classes. One is a Java3D application, which, as far as I can tell, has to extend the Applet class. In order to run the Java3D application in a non-applet/web context, it has to be passed to the constructor of the JMainFrame class. Everything about this works fine, except for the fact that, when the cross on the JMainFrame is clicked, the whole application shuts down, despite using the setDefaultClosingOperation() method.
    Has anyone got any idea what's going wrong? JMainFrame extends JFrame, but is part of the COM packages (com.sun.j3d.utils.applet.JMainFrame). The annoying thing is that all other inherited methods seem to work fine! Here is the code I am using:
    //This is the Java3D App - extending Applet
    PointCloud thisCloud = new PointCloud(points, pointCount);
    //This is the JMainFrame object which allows the applet to run as/in an application
    JMainFrame pointCloud = new JMainFrame(thisCloud, 800, 600);
    //All these inherited methods work, except the last one
    pointCloud.setTitle("Point Cloud - " + fileNameBuffer);
    pointCloud.setIconImage(new ImageIcon("heads.png").getImage());
    pointCloud.setDefaultCloseOperation(JMainFrame.DO_NOTHING_ON_CLOSE);
    I was going to then set a windowClosingEvent to deal with the act of closing the JMainFrame, but I can not get it NOT to close.
    Incidentally, I posted this on the Swing forum, it may relate more closely to this forum. As such, can anyone suggest an alternative for running/launching a Java3D application from inside a Swing application, without needing the Java3D app to extend Applet? e.g. Could you add a Canvas3D object to any other type of Swing container?

    Thanks for the reply - how do you get the Java 3D app to initialise using JFrame - when extending Applet
    you use the init() method of Applet. What do you use for a JFrame? At the minute I am adding the
    canvas to a JFrame, and it won't display my 3D world.You are in application mode, not in the applet mode.
    For application, you could initialize your application anywhere as you want, just make sure
    the jframe.setVisible(true) is the last statement to be executed.
    (This is the same as normal swing application)
    Because once jframe.setVisible(true) it will start swing event-dispatch thread.
    So init your application before starting of swing thread is good idea.
    I change the java3D tutorial helloJava3D example by using JFrame instead of Applet, I do not have trouble.
    (Suggestion: Try modify the tutorial by using JFrame first, if you success, then the problem is in your canvas3D scene graph problem; if it fail, then maybe take a look about how a normal swing application need to be, or I could post my HelloJava3D for you)

  • Access to Infrared port from Java MIDlet

    Hey, I would like to know id its posible to access to the infra red port in the mobile phone using a Java MIDlet. I want to access to the port, read text information from the port and display this info in the screen.
    Thanks

    Hi,
    E.g Siemens SL45i have own APIs to access to the phone's functions, but there's no standard for that in MIDP.

  • System freezes every time I use a Java based app

    Hi all,
    Very new to all this as I don't really know what to do, where to post or really how to ask about this.
    It started out that I wanted to try to use JAlbum, a program that creates photo albums to share on the web etc..... I upgraded the Java app on my WinXP Pro (service packs and updates in place) to the newest version of Java. I even uninstalled all previous versions of Java, rebooted a couple of times and installed the newer version (j2re-1_4_2_10-windows-i586-p.exe).
    I was instructed to install the JEdit free edit pad type app. The application went smoothly. When I exited the installer my system froze. When I rebooted and started up the .jar file all went well. I created a test file and saved it and then exited the program. System froze up. Started up JAlbum after rebooting, same thing. Program works right but then system freezes up and I have to do a hard reboot.
    I work with 3D stuff all the time (Poser, DAZ Studio) as well as in Photoshop CS so my system is kept up to date for this reason alone. My system is considered very stable my geek friends and so this is very strange as this has NOT ever happened to me in the years I've been using WinXP Pro!!
    Please let me know if there is anything you can suggest, besides reloading up Windows, that's not an option, that's the easy way out and with more thant a hundred programs on board that is not something I relish doing!
    Thanks very much
    System Specs:
    Win XP Pro Edition (SP 1+) - P IV/2.0 Ghz
    NVIDIA GeForce FX 5700LE - 250Mb's DDR RAM
    Sony ViewSonic G810 monitor - 20" viewable screen
    On board - 1 1/2 Gigs of DDR RAM
    1 internal - 1 external Western Digital Hard Drives
    1 internal Seagate Hard drive
    Richard :-)

    I was turned on to a thread here that seems to have some info.
    http://forum.java.sun.com/thread.jspa?threadID=661574
    I did update my Direct X that I'm embarrassed to admit was out of date. Still froze the system after the reboot trying to run a Java based app. So now I have tried the vaiable solution and set the nVidia video card options to Application Controlled and I'll see what happens.
    I'm going to reboot, again and then run JAlbum and keep my fingers crossed. If that doesn't work then how do I implement the last posters suggestion?? Through the Run dialog (copy/paste and hit OK?)
    Thanks much for your help!
    Richard ;-)~

  • In search of simple java editor

    Hello,
    I'm currenty searching for a java component that can display images.
    Preferably it has:
    - zooming capabilities
    - pluggable commands
    I have allready tried using DisplayJAI in combination with imagefilters. The only thing missing is a simple zooming (currently, I have quality loss when zooming in and out succesively).
    Does anyone know of a simple imagewidget that has these capabilities (preferably open-source)?

    You could just extend JComponent and make your own class...

  • Please I need help in java oracle.apps.per.DataInstall

    Hi all
    Please can any body help me , when I try to run datainstall to prepare add hrglobal patch by using this command:
    java oracle.apps.per.DataInstall thin hostname:dbport:oraclesid
    but I got this error :
    Data Install java.sql.SQLException: Io exception: Got minus one from a read call
    Regards

    Hi,
    Please mention the application release along with the database version and OS.
    Are you running the command as applmgr user and after sourcing the application env file?
    java oracle.apps.per.DataInstall thin hostname:dbport:oraclesidAre you passing the apps username/password to the command?
    java oracle.apps.per.DataInstall <apps username> <apps password> thin <host:port:sid>
    Latest Oracle HRMS Legislative Data Patch Available (HR Global / hrglobal) [ID 145837.1]
    Please see the suggested solutions in these docs.
    Application Of Patch 5404886 Fails During AK Load Session Error: 17002 Io Exception: Got Minus One From A Read Call [ID 404313.1]
    Unable to connect jdeveloper to 11.5.10 instance [ID 294685.1]
    Thanks,
    Hussein

  • How to search entire headers in Mail.app?

    Given that "Entire Message" is anything but how do you search all headers in Mail.app?
    I'm guessing it's not possible to do this.
    Also does the spotlight importer even index this stuff?

    Which os are you using?
    How large is your hard drive and how much hard drive space do you have left?

  • Running java swing apps thru telnet... [Is this possible?]

    Hi All!
    I am just wandering if it is possible to run swing applications thru telnet since everytime I run it... it returns ang error....
    Exception in thread "main" java.lang.NoClassDefFoundError: sun/awt/X11GraphicsEnvironment
    at java.lang.Class.forName1(Native Method)
    at java.lang.Class.forName(Class.java:173)
    at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:90)
    at at sun.awt.motif.MToolkit.<clinit>(MToolkit.java:109).null(Unknown Source)
    at java.lang.Class.forName1(Native Method)
    at java.lang.Class.forName(Class.java:173)
    at java.awt.Toolkit$2.run(Toolkit.java:754)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:745)
    at javax.swing.ImageIcon.<init>(ImageIcon.java:226)
    at javax.swing.LookAndFeel$1.createValue(LookAndFeel.java:295)
    at javax.swing.UIDefaults.getFromHashtable(UIDefaults.java:203)
    at javax.swing.UIDefaults.get(UIDefaults.java:148)
    at javax.swing.MultiUIDefaults.get(MultiUIDefaults.java:65)
    at javax.swing.UIDefaults.getIcon(UIDefaults.java:429)
    at javax.swing.UIManager.getIcon(UIManager.java:562)
    at javax.swing.plaf.basic.BasicOptionPaneUI.getIconForType(BasicOptionPaneUI.java:600)
    at javax.swing.plaf.basic.BasicOptionPaneUI.getIcon(BasicOptionPaneUI.java:586)
    at javax.swing.plaf.basic.BasicOptionPaneUI.createMessageArea(BasicOptionPaneUI.java:337)
    at javax.swing.plaf.basic.BasicOptionPaneUI.installComponents(BasicOptionPaneUI.java:178)
    at javax.swing.plaf.basic.BasicOptionPaneUI.installUI(BasicOptionPaneUI.java:146)
    at javax.swing.JComponent.setUI(JComponent.java:475)
    at javax.swing.JOptionPane.setUI(JOptionPane.java:1725)
    at javax.swing.JOptionPane.updateUI(JOptionPane.java:1747)
    at javax.swing.JOptionPane.<init>(JOptionPane.java:1710)
    at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:832)
    at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:646)
    at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:617)
    at JTest.main(JTest.java:40)
    Source Code:
    import javax.swing.*;
    import java.awt.*;
    public class JTest extends JFrame{
    JPanel pnlMain = new JPanel();
    JLabel lblMsg=new JLabel("This is only a test.");
    Font font=new Font("Arial", Font.BOLD, 28);
    public JTest(){
    try{
    this.setTitle("Unix Frame Testing");
    this.setBounds(10,10,500,100);
    this.setVisible(true);
    this.setDefaultCloseOperation(this.EXIT_ON_CLOSE);
    lblMsg.setFont(font);
    lblMsg.setBounds(100,10,250,50);                    
    pnlMain.setLayout(null);
    pnlMain.add(lblMsg);
    this.setContentPane(pnlMain);
    }catch(Exception e)
    { System.out.println("Unable to Display Window.");
    JOptionPane.showMessageDialog(null,"Unable to Display Window.","Error",JOptionPane.INFORMATION_MESSAGE);
    System.exit(0);
    public static void main(String args[]){
    JTest test=new JTest();
    }

    "scripts" are entirely different from GUI applications. What do you expect to happen when you run a Swing application through telnet on another machine? Do you expect the Swing UI to be magically transported to the local Windows machine?
    Not gonna happen. Yes, like ejp hinted, you could run an X-environment on your local machine and have the Swing UI tunnel its output there, but are you sure you want GUI apps to run on a remote machine like that? It's not gonna be fun to work with, I'll tell you that.
    Why not create a Java WebStart app (or perhaps even an applet) out of your application, so your users can run the application locally?

Maybe you are looking for