URGENT JDBC help needed. Thanks a lot~

Hi!
I have 3 java files.
1st : The INTERFACE which accepts users' input
2nd : CHECK the input, check c = new check(input);
3rd : QUERY the Database using the input, query q = new query(q);
Basically, the INPUT is passed as a parameter from one file to another file.
My question is, how to pass the query results back to the interface (i.e., the 1st java file)?
Thanks a lot~

Could you briefly write the modifications of the 3
java files needed for me please?
1st : The INTERFACE which accepts users' inputJust accepts or displays?
If displays then....
- Take ArrayList
- Extract data from ArrayList
- Put data into gui components.
2nd : CHECK the input, check c = new check(input);No changes needed.
3rd : QUERY the Database using the input, query q = new query(q);1. Create ArrayList, call it 'a'
2. Create ArrayList for each record in ResultSet, call it 'r'
3. Extract data from ResultSet row, put into 'r'
4. Put 'r' into 'a'
5. Loop back to 2 until ResultSet is empty.

Similar Messages

  • My ipad is hung what to do?i cannot switch off for 2 weeks because of i cloud it say full and cannot be back up i try to close or open the settings but nothing happen anyone can help me thanks a lot in advance

    my ipad is hung what to do?i cannot switch off for 2 weeks because of i cloud it say full and cannot be back up i try to close or open the settings but nothing happen anyone can help me thanks a lot in advance

    Welcome to Apple Support Communities
    Hold Sleep and Home buttons for 10 seconds until the device restarts

  • Urgent export help needed

    Extremely urgent help needed! I'm on a tight deadline. I'm working on a sequence, with all my settings set to DV. My client needs an AVI file as an output. After exporting using conversion, the file looks and plays fine, except for any transitions. At the start of each transition, there is 1 frame that is unrendered. I have rendered the entire sequence, and tried the export many times now, and I can't figure out what's wrong. I'm working on v5.1.4. Can someone please help?????

    Thank you, kind sir! < </div>
    Careful who you're callin' names around here, buddy!
    Thank you for the kind words, that's why we're here. Hrdly anyone ever closes their threads on a positive note, I thank you for that, too.
    Good luck with your future projects and those squeaky deadlines.
    bogiesan

  • Urgent Flash help needed; Using Movie Clip Objects

    Hello,
    I am currently trying to design a small flash movie.
    I have a "Movie Clip" object (a short animation) that i wish to act like a static object until a certain frame on the main Timeline.
    Then i want it to play out, at it's own pace, just like normal, until it finishes (no looping)...
    What do i need to put into, and where do i put it?
    So in short, frame 30 of the main animation triggers the clip, whilst the main animation still runs...
    I know very, very minimal AS3... so please, can someone help me?
    A lot of solutions suggest a button, but I don't want to use a button, as it's not interactive - just a movie.
    i just want the damn movie clip to play in the damn movie when it reaches frame 30! it shouldn't be that hard..

    There is most likely no need for any code. And most likely no need for a movieclip even.
    It sounds like you would need a graphic symbol. (You can convert it in the library or you can just change the instance you have placed on stage.)
    First select the symbol on its first keyframe and on the properties panel select the looping options and tell it single frame, first 1.
    Then move along your timeline to where you want the animation to start playing. Add a keyframe. Now select Once, first 1.
    Now it will start playing, you will be able to see it play as you scrub the timeline.
    If you use movieclips and code for this, you won't be able to see them play together as you scrub the timeline.

  • Urgent webcam help needed please

    i didnt know where else to put this post. Anyway i just got a logitech fusion webcam which they sell on the apple store. i plugged it in and set it up. whenever i speak to anyone on skype(its the only one i use). they always say that around every 20 seconds they get a noise their end that sounds like wind noise. ive opened up the sound box in preferences and can see it happening form the noise indicator. but dont know what it is or how to stop it.. any ideas i really need help.. thanks in advance. the webcam by the way has a built in mic and i have the output coming through my speakers. ive also moved the speakers away from the webcam in case of interference but no joy.. please help..

    Hi-
    Checking the Skype forums reveals a concensus that the problem is most likely within the Skype software.
    http://forum.skype.com/index.php?s=6b9ae6327268168f5c1291d17df06400&showforum=15
    Some suggest disabling the mic, and using a seperate mic. This is because some believe the hardware combo (camera/mic) over USB is the problem. Others suggest using the macam driver. Others still, claim there was no noise before 2.5. There are even problems with the Windows version, apparently.
    A new Skype for Mac beta was released today- 2.7. You can download it from the following link:
    http://forum.skype.com/index.php?act=announce&f=15&id=38
    Would be adviseable to report the current bug to Skype. Include all system details, software and OS versions. The more people that report the problem, the sooner a fix will come about.

  • Urgent help needed, thanks.

    I am currently in London, but live in the Namib Desert in Namibia. I've been told by the techy in Apple shop London that Apple Remote Desktop 3 will do all of the following and have purchased it, I leave back for the desert and will not have the opportunity to change the product after the 24th Dec. Would someone please be kind enough to confirm that I have done the right thing. Thanks a million.
    I need a system whereupon all docs and files on my powerbook, iMac and Minimac will sync so that at say 12.00am. everyday they all have the same info on them. I run airport at home and all the machines are constantly on, I also have 24/7 internet (a huge brag in Namibia). Futhermore I travel around a fair bit and need to access files on my iMac (at home) from my laptop (in the UK for example).
    A huge thank you in advance for taking the time to help a mac novice so to speak. Although I'd rather be a mac novice than a windows expert.

    Apple Remote Desktop is not a synchronization solution. You can use it to copy files between the administrator workstation and the client (and vice-versa), but you will have to know what needs to be copied and do it yourself; it won't do determine what needs to be copied for you. If synchronization of files between your two systems is all you wish to do, ARD is probably not the best solution for you and I would advise you return it.
    Probably a better solution is to just set up file sharing on your iMac, set up your Airport to allow outside access to the iMac (look for information on port forwarding in the Airport forums if you need assistance), and use a utility such as Synk to handle the copying.

  • Urgent!help needed!!Payment issue!!!

    Last day I updated my credit cart info to make the payment and on the screen comes up a hint as follows:
    I updated the info for 6 times to make sure it is OK.Every time I update I receive a hint from my bank about $1,which in total is about $6 for 6 times.
    And words from the bank said the money for the creative cloud still remain in my account and was not charged.
    later I check with the customer service support and I was told the payment was not successfully.
    And in my transaction record there was no record of October.
    What is exactly the situation????
    Another problem is that can I change my email address?
    My email address which used to register is yahoo china .Yahoo China email has been shut down and I cannot log in any more.
    Urgent help is needed!! Anyone especially customer support from adobe can help me???Thanks you very much!!

    Hi Prasad,
    if you have performance problems with your table because of lots of different controls in it, then maybe you could try instead of that to create two tables, one for display of rows  (only textviews), and the other table for editing only one row (currently selected row). The second (for edit) table can be shown only when you want to add a new row, or edit selected row and it can be hidden when you are finished with editing selected row.
    In that way you can have one big table with only textviews and no events, and one small - one row table for editing with dropdowns, datepickers etc.
    You can put EditTable(the one for editing) above ShowTable (the one in which you display rows as textviews).
    ie.
    EditTable
    ShowTable
    Hope that helps,
    Ladislav

  • URGENT dreamweaver help needed

    I need some urgent help please any experts here. I have 2
    html pages. One is my index and one is my home. The index has an
    image with a ENTER link which when clicked takes them to another
    html which has my flash file in it. The problem I have is when
    someone clicks enter the home page opens in big window and my flash
    pice is stuck on one side. It is 766 by 662 and I want when someone
    clicks enter that the home page open in a smaller window around 776
    by 662 in size and in center of screen so it looks better. Also
    would be nice when someone type web address the index page also
    opens in smaller size. Please can someone tell me in as easy to
    understand terms how to to this. Thanks and hope someone is able to
    help

    Who are you to make my browser fit your site? Wouldn't it be
    much more
    professionaly to make your site so skillfully that it fits
    any browser?
    Besides, once you change my browser from the way I like it,
    you do not
    change it back - that's rude in anyone's book....
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "liquidsuite78" <[email protected]> wrote in
    message
    news:ehofhq$b15$[email protected]..
    > Thanks for advice but I disagree with you. Who are you
    to say how people
    > will
    > see my site when I am the that knows how it looks and
    its surely my choice
    > how
    > I project my website. All i asked was for how to do
    something. I know
    > that my
    > site like 100s of other flash sites I have seen all open
    within their own
    > re
    > sized html specially when the flash piece is smaller
    then average website.
    > I
    > think mine works better within a box as the way the
    effects and text
    > animate.
    > I tried with big space around and it just does not work
    in the creative
    > way I
    > wanted it too. I think without seeing it you can not
    judge it. Anyway I
    > guess
    > answer to my post is you dont know how to do this.
    Thanks for your help I
    > might
    > just end up doing big space cause no option so thanks
    for this also.
    >

  • [b]JDBC help needed[/b]

    Hello,
    I'm using Win2000 SP4 and J2SDK1.4.2_05 and I'm trying to connect to a remote server where Oracle9i ver. 9.2.0.1.0 is installed.
    I have simply downloaded ojdbc14.jar into [Java_HOME]\jre\lib\exp\ directory, without setting a CLASSPATH
    I've written this code:
    import java.sql.*;
    import oracle.jdbc.driver.*;
    class JDBCVersion
    public static void main (String args[])
    throws SQLException
    DriverManager.registerDriver
    (new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection
    ("jdbc:oracle:thin:@HOST:1521:SID","user","passw");
    DatabaseMetaData meta = conn.getMetaData();
    System.out.println("JDBC driver version is " + meta.getDriverVersion());
    When I'm trying to compile everything is O.K.:
    c:\>javac JDBCVersion.java
    but when I'm trying to run it I get an error:
    c:\>java JDBCVersion
    Exception in thread "main" java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver at JDBCVersion.main(JDBCVersion.java:10)
    And as soon as I set a CLASSPATH I'm getting this:
    c:\>java JDBCVersion
    Exception in thread "main" java.lang.NoClassDefFoundError: JDBCVersion
    Watta hell I'm doing wrong?
    Please someone HELP me, cause I'm losing my mind already.
    THANKS.

    I solved this problem myself
    No need to set any CLASSPATH
    just when run java program need to write
    java -cp .;[ORACLE_HOME]\jdbc\lib\ojdbc14.jar program_name

  • Backup RAC with RMAN..(on diff file system)..URGENT..HELP NEEDED

    hello all,
    I have not work a lot on SAN storages. One of my client has implementated 9i RAC. Now he wants to Add two more disk in SAN storage (Implemented RAID). So sun engineers will do this but before this i have to take full database backup(80GB database) throught RMAN. The problem or confussion from my side is that the database is on Sun SAN storage and i have to put the Full database backup taken by RMAN on local hard disk on the node (node 1 of rac). Is the possible since the SAN storage is RAW file system (as i guess) and i am putting the backup on local system.
    Please help me out ...i have do this in couple of days..
    Please tell me prosedure too to how to change the path of backup in RMAN if above is possible..
    Its urgent
    Thanks and Regards!!
    Pankaj Rawat

    You best bet is to get your san folks to give you some disk space for a mount point on the last node in the cluster. Once they assign the lun (not raw) have your SAs make it a mounted file system such as /dbbackup.
    Run all of your rman backups on your last node on the cluster. The only draw back is, if that node dies, then you will not be able to run backups. but your backups would be safe as they are on the san.
    Only way to have a mounted file system on all nodes in your cluser is to have some sort of third party file system cluster ware .. such as veritas or OCFS2 - then all nodes could see it.
    I feel the first node in the cluster (the primary node) is the most busy out of the rest .. so thats why the suggestion of running rman on the last node in the cluster.

  • Urgent array help needed! come get some duke points

    this program keeps track of rentals for a shop. Other methods and classes not shown (like Customer, Transaction classes) are also in this program. Every item (created with a constructor in Item class) can hold an array of up to 20 transactions; part of a Transaction object is a rental total, based on a number of rental days * specific rental price for that item rented (backhoe, edger, etc.) If the user presses "t" for total amount of transactions, the following method is called, which calls the getTotalPrice() in another class called Item. My problem here is that even if I enter in transaction amounts, when I press "t", the program just quits, not producing the report and returning me to the main class. I have been over it with the debugger and I am still lost. Below is some selected code; I hope it is sufficient. Please let me know if I need to put up more
    //main
    String input = JOptionPane.showInputDialog(null, "Enter a rental transaction (x)" +
                                                      "\nAdd a customer (c)" +
                                                      "\nAdd an item (i)" +
                                                      "\nReport on a specific item (r)" +
                                                      "\nReport on total dollar amounts of rentals for all items (t)" +
                                                      "\nReport on total rentals for a specific customer (s)" +
                                                      "\nStrike cancel to exit from the program");
              //big huge while
              while (input != null){
                   if (input.equals("x")){
                        rentalTrans();
                   }//if
                   if (input.equals("c")){
                        addCustomer();
                   }//if
                   if (input.equals("i")){
                        addItem();
                   }//if
                   if (input.equals("r")){
                        specificItemReport();
                   }//if
                   if (input.equals("t")){
                        allItemReport();
                   }//if
                   if (input.equals("s")){
                        customerReport();
                   }//if
                   input = JOptionPane.showInputDialog(null, "Enter a rental transaction (x)" +
                             "\nAdd a customer (c)" +
                             "\nAdd an item (i)" +
                             "\nReport on a specific item (r)" +
                             "\nReport on total dollar amounts of rentals for all items (t)" +
                             "\nReport on total rentals for a specific customer (s)" +
                             "\nStrike cancel to exit from the program");
    //allItemReport()
    public static void allItemReport(){ //menu item t
              Item temp = null;
              for (int index = 0; index < items.length; index++){
                   temp = items[index];
              }//for
              JOptionPane.showMessageDialog(null, "Total rental transactions to date amount to: $" + temp.getTotalPrice());
    //Item Class
    public String getTotalPrice() {
              double total = 0;
              String output = "";
              for (int i = 0; i < trans.length; i++) {
                   if (trans[i] == null) {
                        if (i == 0) {
                             output = "There are currently no transactions.";
                        }// if
                        break;
                   }// if
                   else{
                   total += getPerDayRentalPrice();
                   }//else
              }// for
              output+= total;
              return output;
         }//getTotalPrice

    Don't flag your questions as urgent. It's rude. Also don't think that waving with a couple of worthless Dukes is going to get you better/quicker help.
    The reason I respond to your question is because you have explained your problem well and used code tags.
    Try this:class Main {
        public static void main (String[] args) {
            String message = "Enter a rental transaction (x)\nAdd a customer (c)" +
                "\nAdd an item (i)\nReport on a specific item (r)\nReport on total "+
                "dollar amounts of rentals for all items (t)\nReport on total rentals"+
                " for a specific customer (s)\nStrike cancel to exit from the program";
            String input = JOptionPane.showInputDialog(null, message);
            while(input != null){
                if (input.equals("x")) rentalTrans();
                else if (input.equals("c")) addCustomer();
                else if (input.equals("i")) addItem();
                else if (input.equals("r")) specificItemReport();
                else if (input.equals("t")) allItemReport();
                else if (input.equals("s")) customerReport();
                else System.out.println("Invalid option!");
                input = JOptionPane.showInputDialog(null, message);
            System.out.println("Bye!");
        // the rest of your methods ...
    }

  • Urgent CSS Help Needed

    Hi guys, I need some serious help, I am making a website for
    University and am struggling to center the website so that it stays
    centered on different resolutions and when the window is made
    smaller. My lecturer gave me the code which is apparently this -
    body {
    margin:50px 0px; padding:0px;
    text-align:center;
    #Content {
    width:500px;
    margin:0px auto;
    text-align:left;
    padding:15px;
    border:1px dashed #333;
    background-color:#eee;
    but I have no idea what to do with this stuff in order to
    correctly implement it, the attached code is an example of one of
    the pages I want centering, could someone either give me a step by
    step walkthrough of what to do? or could they show me directly
    where the code goes in the attached stuff.
    Thanks in advance

    try this:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=utf-8" />
    <title>Simons Self Portrait Bio</title>
    <style type="text/css">
    <!--
    body {
    margin:50px 0px; padding:0px;
    text-align:center;
    #Content {
    width:500px;
    margin:0px auto;
    text-align:left;
    padding:15px;
    border:1px dashed #333;
    background-color:#eee;
    position:relative;
    #apDiv1 {
    position:absolute;
    left:0px;
    top:1px;
    width:135px;
    height:183px;
    z-index:1;
    #apDiv2 {
    position:absolute;
    left:76px;
    top:119px;
    width:383px;
    height:226px;
    z-index:2;
    -->
    </style>
    </head>
    <body>
    <div id="Content">
    <div id="apDiv1"><img src="Images/xboxbio.jpg"
    width="700" height="500" border="0" usemap="#Map" />
    <map name="Map" id="Map"><area shape="rect"
    coords="12,456,122,492" href="xbox.html" />
    </map></div>
    <div id="apDiv2">
    <iframe src="bioframe.html"
    width="383" height="200"
    align="right" marginheight="0" marginwidth="0">
    </iframe>
    </div>
    </div>
    </body>
    </html>

  • Urgent(Transformation help needed)

    Hello
    Can anybody help me in the transformation.
    I am selecting data from the table, i used (Database adapter-Single table
    selection).
    I need to place that data into the text file of Fixedlength format.Each record is
    of diffent types.
    My target xsd is:
    ==============
    ?xml version="1.0" encoding="UTF-8" ?>
    <xsd:schema xmlns:xsd=..........>
    <xsd:element name="Root-Element">
    <xsd:complexType>
    <xsd:sequence minOccurs="0" maxOccurs="unbounded">
    <xsd:element name="REC_2701" minOccurs="0" nxsd:startsWith="2701" maxOccurs="unbounded" nxsd:style="array" nxsd:cellSeparatedBy="${eol}">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="C3" type="xsd:string" nxsd:style="fixedLength" nxsd:length="1">
    </xsd:element>
    <xsd:element name="C4" type="xsd:string" nxsd:style="fixedLength" nxsd:length="6">
    </xsd:element>
    <xsd:element name="C5" type="xsd:string" nxsd:style="fixedLength" nxsd:length="5">
    </xsd:element>
    <xsd:element name="C6" type="xsd:string" nxsd:style="fixedLength" nxsd:length="12">
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="REC_2702" minOccurs="0" nxsd:startsWith="2702" maxOccurs="unbounded" nxsd:style="array" nxsd:cellSeparatedBy="${eol}">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="C3" type="xsd:string" nxsd:style="fixedLength" nxsd:length="1">
    </xsd:element>
    <xsd:element name="C4" type="xsd:string" nxsd:style="fixedLength" nxsd:length="6">
    </xsd:element>
    <xsd:element name="C5" type="xsd:string" nxsd:style="fixedLength" nxsd:length="5">
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    When i tranform the data I am getting result fixed length data file in the following format.
    2701C50 50 MUVT01
    2701C03451 03451SIMUL1
    2701C44034 44034SIMUL3
    2702C50 50
    2702C03451 03451
    2702C44034 44034
    But i need to get the fixed length file data in the below format
    ============================================
    2701C50 50 MUVT01
    2702C50 50
    2701C03451 03451SIMUL1
    2702C03451 03451
    2701C44034 44034SIMUL3
    2702C44034 44034
    Can anybody suggest me the solution to the above case ?
    Thanking you
    mki

    Only a guess, but could you try removing the nxsd:style="fixedLength" from the xsd?
    Another option might be to concatenate the values in BPEL into one field, trimming the spaces. You could then have an xsd with the file adapter to write out this one column.
    Toby
    Message was edited by:
    tobyc

  • JDBC help needed

    hi
    i am connecting sql using jdbc...and i want to find the exact width of columns in a table.....e.g if a column with type datatime has width 8.........then using getPrecision() and getScale method() it do not return the exact width but it returns (23,3).....can anybody help me in finding exact width of a column
    i shall be thankful
    regards
    muddsar

    let me clear ur confusion.......when u open table in sql server 2000 in design view....it shows u the column length that is allowed......i just want to get that length......actually i m getting exceptionlike this...
    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Column or parameter #3: Cannot specify a column width
    this error appear for datatype like smallint,int......i have also tried to manually create table using sql server query analyzer but it also gave same error if i try to specify column width for smallint or int.
    now whats ur opinion

  • URGENT THREAD HELP NEED!!

    Hi,
    I am trying to attach a very basic phone file browser (based on the one bundled with the J2ME toolkit) to an interface and am have great trouble.
    I think it is to with not using any threads, which i have no idea about. I searched and read some articles to help, but it has not aided the problem and any changes that i make..make no difference.
    I have two classes; one that deals with just transversing through the file system FileSystemBrowser and the other is the GUI that displays the file system graphically called TextReader (ignore the name it will change when the program is finished).
    The Toolkit keeps throwing this message at me every time i run the classes in the emulator:
    Warning: To avoid potential deadlock, operations that may block, such as
    networking, should be performed in a different thread than the
    commandAction() handler.
    here is my interface class code:
    import java.lang.Thread;
    import javax.microedition.lcdui.Form;
    import javax.microedition.lcdui.StringItem;
    import javax.microedition.lcdui.List;
    import javax.microedition.lcdui.Choice;
    import javax.microedition.lcdui.Image;
    import javax.microedition.lcdui.Alert;
    import javax.microedition.lcdui.AlertType;
    import javax.microedition.lcdui.Displayable;
    import javax.microedition.lcdui.Display;
    import javax.microedition.midlet.MIDlet;
    import javax.microedition.lcdui.Command;
    import javax.microedition.lcdui.CommandListener;
    import java.util.*;
    import java.io.*;
    import javax.microedition.io.file.IllegalModeException;
    public class TextReader extends MIDlet implements CommandListener
    private FileSystemBrowser MyBrowser;
    // Options in loadOptions list.
    private String[] loadChoice = {"Locate File", "Favourites Folder"};
    // individual icon images.
    private Image dirIcon, fileIcon, backIcon;
    // icons to be displayed on screen.
    private Image[] icons;
    /* separator character as defined by FC specification */
    private final static char SEP = '/';
    private Command select = new Command("SELECT", Command.OK, 1);
    private Command exit = new Command("EXIT", Command.EXIT, 1);
    public TextReader()
    MyBrowser = new FileSystemBrowser();
    try
    dirIcon = Image.createImage("/icons/dir.png");
    catch (IOException e)
    dirIcon = null;
    try
    fileIcon = Image.createImage("/icons/file.png");
    catch (IOException e)
    fileIcon = null;
    icons = new Image[] {fileIcon, dirIcon};
    private void loadMenu()
    List loadOptions = new List("Load Options:", List.IMPLICIT, loadChoice, null);
    loadOptions.addCommand(select);
    loadOptions.addCommand(exit);
    loadOptions.setCommandListener(this);
    Display.getDisplay(this).setCurrent(loadOptions);
    private void showCurrDir()
    Enumeration e;
    List browser = new List("Locate File:", List.IMPLICIT);
    browser.append(MyBrowser.getCurrentDir(), null);
    System.out.println("got here");
    browser.append("Back", backIcon);
    try
    e = MyBrowser.listContent();
    while (e.hasMoreElements())
    String fileName = (String)e.nextElement();
    //if (fileName.charAt(fileName.length()-1) == SEP)
    if(MyBrowser.isDirectory(fileName))
    // This is directory
    browser.append(fileName, dirIcon);
    else
    // This is a regular file
    browser.append(fileName, fileIcon);
    browser.addCommand(select);
    browser.addCommand(exit);
    browser.setCommandListener(this);
    Display.getDisplay(this).setCurrent(browser);
    catch(IOException ex)
    Alert alert = new Alert("Error",
    "You are not authorized to access the restricted API",
    null, AlertType.ERROR);
    alert.setTimeout(Alert.FOREVER);
    Form form = new Form("Cannot access FileConnection");
    form.append(new StringItem(null,
    "You cannot run this MIDlet with the current permissions. "
    + "Sign the MIDlet suite, or run it in a different security domain"));
    form.addCommand(exit);
    form.setCommandListener(this);
    Display.getDisplay(this).setCurrent(alert, form);
    //throw new IllegalModeException("Directory is Read Restricted or Target is a File");
    private void loadFile(String fileName)
    if(MyBrowser.isDirectory(fileName) || fileName.equals("Back"))
    try
    MyBrowser.transverseDir(fileName);
    showCurrDir();
    catch(Exception e)
    System.out.print("Alert: thrown exception");// fill this in.
    else
    // Code here will open a file when implemented.
    public void commandAction(Command com, Displayable dis)
    if(com == select)
    if("Load Options:".equals(dis.getTitle()))
    showCurrDir();
    if("Locate File:".equals(dis.getTitle()))
    List curr = (List)dis;
    String fileName = curr.getString(curr.getSelectedIndex());
    loadFile(fileName);
    if(com == exit)
    if("Load Options:".equals(dis.getTitle()))
    notifyDestroyed();
    if("Locate File:".equals(dis.getTitle()))
    loadMenu();
    public void startApp()
    loadMenu();
    public void pauseApp()
    public void destroyApp(boolean unconditional)
    My other class FileSystemBrowser has two main methods that are used :
    public void transverseDir(fileName)
    public Enumeration listContent()
    The first method transverseDir(fileName) just adds and removes bits of a file path represented by a string. Nothing to processor intensive. The other method listContent() uses FileConnection methods such as (FileConnection)Connector.open("blah blah") to connect to an actual directory and FileSystemRegistry.listRoots(); to list the inital root files of a phones filesystem.
    I've tried implementing threads on them but it has made no difference and i dont know if im doing it right or whether they even need to be threaded, because the problem may be in the interface. But if this is so i still dont know where it is and how to fix it.
    CAN ANYONE HELP PLEASE?
    I Am doing this as part of my final year project as a university student.
    Thanks in advance.

    Thanks for the replies guys,
    Thats really good stuff to know, but im still not sure what to place inside the thread? (e.g. methods if this is the case which ones or which class), do i need to synchronise anything? if so..what needs to be synchronised? I have read some articles on threading and understand the concepts but i am at a loss when it comes to actual implementing the thread correctly. Because when i have tryed to use threads the same error is thrown:
    Warning: To avoid potential deadlock, operations that may block, such as
    networking, should be performed in a different thread than the
    commandAction() handler.
    Can can one give me further directions on where they think i need to use the threads and synchronisation and how?
    Thanks in advance.
    birdeboy

Maybe you are looking for

  • Can't open Pages Documents

    I've upgraded all my iWork documents and now I can't open things in Pages.  I'm stuck on an endless loop of "You need to be using the most updated version .... which you can get in the app store.... blah blah blah"  I'm suing the most up-to-date vers

  • Jpegs on websites are coming up with a yellow cast. Anyone else?

    [https://picasaweb.google.com/113120418431036860907/January252012?authkey=Gv1sRgCNHp6eKIod_1Zw#5701590386477063250 Example at Picasa]

  • Zooming in on a Pages document

    I've been using Word for so long, I'm having a little difficulty adapting to Pages. I like the Word ability to make the document larger by percentage so, that while I'm working in, for example size 12 font, I can see the document far better at 150% i

  • Icons not showing in munu bar

    Hi , I migrated my forms into 10g successfully. I am having an issue with icons . All my icons are showing on the menu bar except for two. if I take the mouse and move the mouse The hint displays but the icons are not visible. the properties are the

  • After I deleted App still in location services in Mountain Lion?

    After I deleted Evernote a couple of days later I was going through my Security & Privacy settings and I noticed it was still their under Privacy>Location Services so I looked and I had deleted App with TrashMe... So why is Evernote not deleted from