Array display trouble

i have an array that when its searched it displays the result in JOptionPane windows, but if there are more than one result it will show it up in one then another one comes up after and displays in there to. i want them both displayed in the same box part of my coding is here:
if (inputbox == 1){
String input2 = JOptionPane.showInputDialog("Please enter a flight number eg QF5");
for (int row = 0; row < 21; row++) {
if (Flights[row][0].equals(input2)){
JOptionPane.showMessageDialog(null,"flight " + Flights[row][0] + '\n' + "Will be leaving from " + Flights[row][3] + " and going to " + Flights[row][4] + '\n' + "Departing at: " + Flights[row][1] + " And will arrive at: " + Flights[row][2]);
}i use a menu system at the start which they press a number, in this example its 1, it will take them to another box that askes them to enter a flight number which it then searches the array for. it works ok if there is only one answer but if there is more than 1 then it shows them in seperate boxes, i want them in the same box.
thanks for having a look

Sorry, attached the wrong VI so I'm reposting because I ran out of time to edit! This may be a little overly-complex so there may be a better way. But let me know if this is more what you're looking for. You'll have to add the logic for the greater than into the for loop yourself. Also, I am not sure what you want to compare index 0 from the array to. Do you want to skip the comparison there or compare it to zero? If you want to skip that comparison and just start at index one, you could use a case structure around all the code in the for loop and if i=0 you don't do anything.
Edit: Just realized you weren't looking for a difference but an equality, you will have to modify the code a bit but hopefully this is a starting point.
CLA, LabVIEW Versions 2010-2013
Attachments:
Untitled 1.vi ‏14 KB
ramp.png ‏14 KB

Similar Messages

  • Reverse array display

    In my application I have a Boolean array display, and two arrays of double precision floating point numbers.
    Also, I have some graphs, which I can make the lower right corner 0,0 which visually displays my process
    The array displays element 0,0 in the upper left corner, how can I make the lower right element 0,0?
    Thanks
    Martin

    If I was only doing the Boolean display, that could possibly be a solution.
    But, because of the diversity of configurations, 4 X 20 to 12 X 50, the size of the text in the X and Y values, I need to still scroll the numbers.
    Here is a picture of what the page looks like.
    So, when I get a red indicator for a failure, I can scroll the numbers and make a correlation, between the Boolean and X/Y values.
    But, I need to do the Diagonal Flip on all three arrays to coincide with the physical process.
    Attachments:
    Array Layout.png ‏103 KB

  • How to reverse array display order?

    Is there a way to reverse the way labview displays array data?  When using a boolean array I would like the LSB to be on the right side.
    I know that you can use the reverse array function, but that changes the actual data. I would rather just change how the data is displayed.  Also I have quite a few and don't want to have to add that to all of them.
    Thanks

    It should be fairly trivial to add a reverse array before displaying the data. Keep in mind, when you display the data on the Front Panel, you can keep a parallel branch wire on the Block Diagram that is not affected by the Reverse Array.
    Also, if you are displaying many of these arrays, perhaps you could use a 2D array on the Front Panel to show all bitmaps at once? Or, a 1D array that contains a cluster of the Boolean array if the Boolean arrays are ragged/jagged. Using this method would be scalable, meaning you would need only 1 Reverse Array for N arrays you want to display.
    And smercurio_fc is right about the XControl being able to display a reversed array. But if you're not willing to drop Reverse Array in a few places, you're probably not willing to bite off the non-trivial task of creating an XControl (there's a moderate learning curve for getting the hang of creating a good XControl).
    a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"] {color: black;} a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"]:after {content: '';} .jrd-sig {height: 80px; overflow: visible;} .jrd-sig-deploy {float:left; opacity:0.2;} .jrd-sig-img {float:right; opacity:0.2;} .jrd-sig-img:hover {opacity:0.8;} .jrd-sig-deploy:hover {opacity:0.8;}

  • Removing Movieclips from an Array Displayed on stage

    Hi Everyone ,
    I am new to AS3 so please forgive me in advance if I end up annoying anyone ;(
    I need some help in removing Movie Clips from the stage , these were initially loaded off an array
    Here is the Code with the NEXT Button , : for both ARRAYS , Notes and Notes15 ( referring to 15th frame)
    function nextframepop2(Event:MouseEvent):void{
    trace("Mouse Enabled");
    removeChild(notes15[4]);
    removeChild(notes15[3]);
    removeChild(notes15[2]);
    removeChild(notes15[1]);
    removeChild(notes15[0]);
    nextFrame();
    function nextframepop1(Event:MouseEvent):void{
    trace("Mouse Enabled");
    removeChild(notes[1]); // This is Line 635 , but I am not sure what I am doing wrong here.
    removeChild(notes[0]);
    nextFrame();
    I am calling this Function with an If Statement , I need to make sure all the Movie Clips are loaded before the End User decides to move to next slide.
    Here is what I get when I run the Next Button ,
    ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
    at flash.display::DisplayObjectContainer/removeChild()
    at PORTDemoPresent_fla::MainTimeline/nextframepop1()[PORTDemoPresent_fla.MainTimeline::frame 2:635]
    Can anyone please help ?

    Based on what you show it is likely that some other function (like the one before it as shown) has already removed the object.  What you should do is learn to use the trace function to troubleshoot your code.  In this case put in a trace anywhere you add or remove the same object that tells you whether it is added or removed and which line of code it is, realizing that you might be storing the same object with different references to it.  That way you should be able to isolate where things are being removed when you don't expect them to be.

  • DVD display trouble

    On my new MacBoork Pro, when reading video MPEG2 DVD in 16/9 format the display is not stable, about each second some display areas are shifted 10 or 20 pixels top or down.
    On Imac G4 with same OS X 10.4.5 version the same video DVD is displaying with any trouble.
    This default occurs for video DVD format close to the sreen full size, 16/9 scope format or 4/3 format are fully ok.
    Is it a reported default on MacBook Pro ?

    You can build the DVD on your hard drive (just the VIDEO_TS folder or as a DVD image) and try there before burning.
    If you still don't see the menu running the DVD from the hard drive itself the problem is not related at burning at all and I guess there something you are missing during the authoring.

  • Array Display

    I have created a two-dimensional array after collecting information from various objects in the form and I want to display it. What is the easiest way to display each element discretely without building tables and stuffing each cell discretely because that involves too much coding!
    Any suggestions will be appreciated.

    q-bertsuit wrote:
    The program runs fine the way it is now if it is left alone. No problem gathering and displaying the data. It only reacts to external events such as mouse scrolling, changing windows, clicking etc. Would chaning the design have any effect on this? After initialization, the program enters a loop that only aquires data and passes it to an array. Thats it. I dont really see how that can be optimized?
    Thanks for your inputs guys!
    I can esily imagine someone being offered an aspirin tablet years ago reacting similarly saying "I don't see how putting something in my stomach is going to help my headache."
    GUI updates are handled in a single thread.
    When you are not touching the screen the GUI thread has little to do. WHen people are poking at it it has to work harder.
    If the sinlge thread is part of the code flow, it becomes a bottle neck.
    You fix the bootle neck by getting it out of the way of the other tasks. That can be done by seperating the work so the GUI stuff is not involved with the acquistion work.
    YOu don't have to change it if you can live with it.
    I am just trying to explain what you are seeing and offer a method to change it.
    Its your call.
    have fun!
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Display trouble in IE

    Hello All,
    I have a problem with how my website displays in IE that doesn't occur in any other browser that I've tested it in, either on Mac (my platform) or Windows. I have a header in each of my pages build with a single table with some imbedded images and some background images. I can't tell if he problem is with the table/cell height or the image height, but all of the background images extend below their allotted height by 1-2 px as in the following image:
    You can see a gap between the header and the nav bar, which is part of the template that the page is built from. You can also see in the search section that the image extends 2 px below the dashed portion, where it should end. Here is what I am aiming for and what the site looks like in all other browsers:
    Notice how the transition from the header to the nav bar is seamless. Here is the code for the header:
    <table height="82" width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td rowspan="2" align="center" valign="top" background="../Images/Doc_Casagrande_left.gif"><p> </p></td>
        <td width="598" rowspan="2"><img src="../Images/Doc_Casagrande.gif" alt="eClassroom Header" name="Doc_Casagrande" width="598" height="85" border="0" usemap="#Map_Header">
          <map name="Map_Header" id="Map_Header">
            <area shape="rect" coords="102,62,171,85" href="../Index.html" alt="Index" title="eClassroom Home Page">
            <area shape="rect" coords="171,62,228,85" href="../Info.html" alt="Info" title="Additional Information about WHS">
            <area shape="rect" coords="228,62,303,85" href="../Chem%201.html" alt="Chemistry 1" title="Chemistry 1 Main Page">
            <area shape="rect" coords="303,62,370,85" href="../Chem%202.html" alt="Chemistry 2 AP" title="Chemistry 2 AP Main Page">
            <area shape="rect" coords="370,62,440,85" href="../About%20Me.html" alt="About Me" title="More Information about Dr. Casagrande">
            <area shape="rect" coords="439,62,528,85" href="../Contact%20Me.html" alt="Contact Me" title="How to Contact Dr. Casagrande">
        </map></td>
        <td width="200" height="62" valign="middle" background="../Images/bg_search.gif"><!-- Atomz Search HTML for Dr. Casagrande's eClassroom -->
          <form method="get" action="http://search.atomz.com/search/">
            <input size=15 name="sp-q">
            <input name="submit" type=submit value="Search">
            <br>
             <a href="../Advanced%20Search.html" title="Perform Detailed Site Search" class="searchlink">Advanced Search</a>
            <input type=hidden name="sp-a" value="sp1002ba0f">
            <input type=hidden name="sp-p" value="all">
            <input type=hidden name="sp-f" value="ISO-8859-1">
          </form></td>
        <td height="62" align="center" valign="top" background="../Images/bg_search.gif"> </td>
      </tr>
      <tr>
        <td width="200"> </td>
        <td align="center" valign="top" > </td>
      </tr>
    </table>
    If you'd like to observe the behavior directly, the url is http://www.doccasagrande.net/Index.html
    Thanks for your help,
    Lou

    You could zero out default browser settings on everything with the CSS universal selector (*) and then go back and add your own top and bottom margins to the various selectors.
    CSS:
    * {margin:0; padding:0; line-height: 100%; font-size: 100%}
    Additionally, you should endeavor to work with valid code. Some browsers are much less forgiving of code errors than others.
    http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.doccasagrande.net%2FIndex.htm l
    http://jigsaw.w3.org/css-validator/validator?profile=css21&warning=0&uri=http%3A%2F%2Fwww. doccasagrande.net%2FIndex.html
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

  • External Display Troubles

    This is a somewhat different problem from the previously discussed thread regarding the upgrade to 10.5.2.
    I've been using my MPB 15" with a Dell 2007WFP 20" monitor for about two months now, via the DVI cable. I've been using it on extended desktop mode, with spaces set to a 2x2 configuration. This has worked well for me for, as I said, 2 months. Until yesterday.
    I turned on the MBP, and instead of getting the expected login screen on the MBP display with the Leopard background displayed (minus the login window) on the external monitor, I get the expected on the MBP display, but a jumbled image on the Dell.
    This is odd, so I restart only to find the same result. Now, fearing for my two month old Dell monitor, I connected it via VGA (using the adapter), and receive nothing but a blank screen. I also tested this on an Acer LCD monitor connected via VGA, with the same result. So, I know its not my screen, as it works fine with another computer.
    I've called Apple Support, who weren't very useful. They encouraged me to insert the install disk and run a hardware test, which I did. With the monitor disconnected, I received no error codes. With the monitor connected, I received error code:
    4sns/40000000:tgod
    So, I have no idea what that means.
    Any help? Also, any idea if a reinstall of Leopard would work?
    Thanks for any help.

    I think I'm having the same problem as you. My external display which is hooked up through VGA via the dongle my MacBook Pro came with. Ever since that **** graphics card update it seems my HP w2207h will not work in OS X. I have windows installed on my machine and it works just fine in windows. That is probably the thing that ****** me off the most about this. In OS X the external monitor recieves NO signal from my MBP but I have 2 displays in the preferences and can rearrange them as if they both worked. *** APPLE! This is pretty ridiculous problem to have and a patch needs to be put out pronto. If not luckly I have a Time Machine backup of before this **** graphic card update. After a couple more days I'm restoring it and not installing the graphics update.
    Message was edited by: Nishimori

  • Display trouble

    please help me,
    this is stupid but some how i cannot manage to connect the tv (LG LCD) as a display
    computer recognises it but TV shows "no signal"

    Have you made sure to change to the correct input on the television?

  • 2010 27inch iMac display trouble

    My 27inch iMac isn't two years old yet, I paid apple a fortune for it, so you can imagine my annoyance, when, three months a ago, the left side of the screen appeared to darken slightly. I phoned customer service and they basically said its out of its one year warranty and there's not much they can do...grrr....
    Now, to make things worse, the entire display just randomly blacks out. At first, this was for a few seconds, now it's getting longer and sometimes won't fire up at all.
    I have been reluctant to walk in to an apple store with it because the nearest one is an hour away and it's a fair size of a machine.
    Will the direct approach do any good? I have a supposedly state of the art machine that I can't use!!!

    The display failed two months, but I had already purchased AppleCare when I bought the machine, since Amazon offered it with a significant discount. That way, I wouldn't have to remember to get it at year's end. So, most likely the one-year warranty covered that and AppleCare covered the HD going south three months ago.

  • Playing movies display trouble

    here's what I have now. My macbook is set up to a mitsubishi projector and I'm trying to run a keynote presentation on it.
    I'm able to get everything to work fine with the presentation, the notes are on the laptop and the projector screen simply shows the current slide so everything works fine. The only thing tripping me up is when I have a movie in the slideshow the image of the movie does not appear on my laptop. There is nothing wrong with the display on the projector screen, that works fine, and the sound even comes out fine from my laptop but is there a way to get the movie to play on my latop as well as the projector display?

    i restarted itunes and my atv2 (i was watching netflix at the time) went back to the menu as if it was disconnected from the network. however, this couldnt be repeated so maybe it was a spurious thing.
    anyway, the music now plays just fine from my ipad and mbp.
    its the video that will not work.
    i noticed that i had to chnage the file extension of some files to "m4v" to be able to put them on the ipad (others transferred as "mp4) so i didnt know if this mattered. i was under the impression that as long as an audio or video file opened and played in itunes it could be played on any apple device (ipod, ipad, iphone, atv, etc). is this correct? if not, what format to i use when converting video to watch on my ipad or stream to atv2? i want to put my home movies on m tv as background when i am studying or otherwise occupied but just need something in the back ground.

  • X11 DISPLAY troubles

    Hi,
    We've been developing a Web Application in Windows, using the Sun Java System Application Server Platform 9 installed on the same PC. Just now, we want to move the web application into a Red Hat Linux Server, also with the Sun Application Server, and run the application with a host PC wih Windows. The application starts OK, but launches an exception (cited below) when it has to open a 'File Dialog Box'. The exception is:
    Servlet.service() for servlet Faces Servlet threw exception
    java.awt.HeadlessException:
    No X11 DISPLAY variable was set, but this program performed an operation which requires it.
    Note that we doesn't have this problem running the application in local using Windows.
    Actually, the Red Hat Linux has no graphical environment.
    How to solve this problem? It's compulsory to have a graphical environment in the server?
    Thanks a lot!!
    Xavi.

    Your app apparently has a GUI, but you're running the program without a GUI. Do you see the conflict there?
    Linux (usually) uses X11 as its GUI toolkit. The error message you're seeing is saying that it's trying to use X11, but the way you're running the program, X11 hasn't been properly set up.
    A good way to deal with this is:
    1) install Cygwin, including the X11 utilities.
    2) start the X11 server on your PC. The command for this is "startxwin.bat", in Cygwin, I believe.
    3) connect to your linux box. Either:
    3.1) use the xhost utility to configure your PC's X server to accept
    connections from your linux box, and then set the DISPLAY variable
    on your linux box
    or
    3.2) use X11 tunnelling (e.g., if you're using putty) when connecting to
    your linux box
    4) then you can run the program

  • Windows 8 display trouble

    hi everyone
    i installed windows 8 1 week ago. But my graphics card not adaptable windows 8. 
    My trouble is http://www.youtube.com/watch?v=b_ZKt8mqXOM
    what i must do ?
    i have to solve this problem. 
    HELP MEEEEE.
    Toshiba Satellite A665 3DV11X 
    Attachments:
    Adsız.png ‏113 KB

    Satellite A665-3DV11X (PSAW9U-01C002)
    You probably won't like my suggestions.
    To discover if you have a hardware failure, restore the hard disk to its original out-of-the-box contents using Toshiba recovery media. If you failed to burn recovery discs, you can obtain them from Toshiba.
       Order Toshiba Recovery Media
    For instructions, see the section Restoring from recovery DVDs/media, which begins on p. 73 of the User's Guide.
       Satellite A660 Series User’s Guide
    If the video is okay, upgrade to Windows 8 by carefully following the instructions here.
       Toshiba Windows 8 Upgrade Information
    -Jerry

  • Russian character display troubles

    Hi all
    My problem is:
    The DB codepage is 1100 (ISO1).
    Russian chars come from R/3 side in 1500 (ISO5) codepage and stored as is in a DB.
    There is no RU language pack installed on BW system.
    As the result I am able to display this data only through the WEB template reports, by forcing them to display data in Cyrillic(ISO) codepage.
    And for me it seems, that there is no way to do the same inside the BeX.
    Has somebody got any idea how to do it?
    BRG
    ABM

    SQL> create table t1(name varchar2(5));
    Table created.
    SQL> commit;
    Commit complete.
    SQL> insert into t1 values('йцу');
    1 row created.
    SQL> !echo $NLS_LANG
    RUSSIAN_RUSSIA.WE8ISO8859P1
    SQL> select * from t1;
    NAME
    eoo
    SQL> select name,dump(name,1016) from t1;
    NAME
    DUMP(NAME,1016)
    eoo
    Typ=1 Len=3 CharacterSet=CL8MSWIN1251: 65,6f,6f
    IN ABOVE $NLS_LANG IS SET WRONG
    SO I MADE CHANGES
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SQL> !export NLS_LANG=RUSSIAN_RUSSIA.CL8MSWIN1251
    SQL> !echo $NLS_LANG
    RUSSIAN_RUSSIA.CL8MSWIN1251
    SQL> select * from t1;
    NAME
    eoo
    SQL> select name,dump(name,1016) from t1;
    NAME
    DUMP(NAME,1016)
    eoo
    Typ=1 Len=3 CharacterSet=CL8MSWIN1251: 65,6f,6f
    STILL IT IS SHOWING SOMETHIG OTHER THAN RUSSIN CHARACTERS
    i m using putty to connect to database and i have set language Win1251 (Cyrillic) in putty

  • 10.5.2 External Display trouble

    I installed 10.5.2 yesterday, with my external Display (Eizo S2431W) plugged in.
    After the update had finished, the external Display had only a resolution of 1440x900 (like the mbp display).
    Then i installed the graphics-update.. no change.
    Since the updates i have the following issue:
    I start my Macbook Pro with the external display plugged in and the maximum resolution is 1440x900 (instead of 1920x1200) and it does not get the proper names, just "Main-Display" instead of "S2431W".
    When i plug it out, the mainscreen does not come back to the mbp. It stays as second display without menubar and dock.
    I have to restart the mbp without the external display. When i then plug it in, everything works just fine.
    ..any ideas about this issue?

    Similar problems today. Yesterday evening I used Software Update to go to 10.5.2 from 10.5.1. After completing the update, Software Update launched and told me that Leopard Graphics Update should be applied and that it required 10.5.2.I also applied this update. During both updates I had an external Samsung LCD connected via the DVI -> VGA adapter that came with the MacBook Pro. There were no issues with the automatic restarts and viewing on the external display at the max resolution.
    Today I connected the MacBook Pro to my Apple Cinema Display at work, per usual. Pressed the power button and closed the lid. The desktop background appeared on the ACD and then went blank. Typically I press a key on my external keyboard and the ACD comes on with the full desktop at max resolution. Now, the ACD comes on briefly with the desktop background only and then the MacBook Pro goes to sleep. Pressing a key on the external keyboard revives the ACD briefly followed by the same sleep behavior. Upon opening the lid on the MacBook Pro the screen is black and the keyboard is unresponsive. A forced restart is needed.
    I have tried connecting the display after fully starting the laptop and the same behavior results. I have also repaired permissions and reset the PMU. Neither had any effect on the behavior.
    So far, I can't use the ACD with the MacBook Pro with 10.5.2.

Maybe you are looking for

  • Snow Leopard unusable with Broken Pipe messages in the console

    Hello Recently, probably after having installed OS X 10.6.8, I noticed that after a while, something within the OS becomes saturated leading to no new processes being able to be started.  All existing programs continue to run and all seems normal exc

  • Hkey_local_machines\software\classes\.cdda error

    When installing Itunes for the first time I get an error: Could not Open Key HKEYLocalmachines\software\classes\.cdda\open withprogids. Verify that you have sufficient access to that key, or contact your support personnel. I have ensured I was instal

  • Issue while sending an email on saving the PO in trnasaction ME22

    “  Adobe Reader could not open ‘XeroxPurchase order 80000001222_20070327064958_X.PDF’ because it is either not supported file type or because the file has been damaged (for example, it was sent as an email attachment ans wasn’t correctly decoded)”. W

  • White on Black option and photos

    I like the look of White on Black. Settings/General/Accessibility/White On Black But the photos I've viewed so far when the phone is in this mode have the look of negatives. Is it supposed to be this way, or is there another setting I'm missing? I ca

  • SAPScript - To break a line in two

    Hello Experts, I am using an standard text, where I need to display email in the right side. If email is 20 char, it comes normally, but if its longer then it wont come. Please suggest. &V_SMTP_ADDR1& - char(20) &V_SMTP_ADDR2& - rest part(221 char) W