How do you invoke a method with native int array argument?

Hi,
Will someone help me to show me a few codes samples on how to invoke a method which has only one argument, an int [] array.
For exampe:
public void Method1(int [] intArray) {...};
Here is some simple code fragment I used:
Class<?> aClass = Class.forName("Test2");
Class[] argTypes = new Class[] {int[].class};
Method method = aClass.getDeclaredMethod("Method_1", argTypes);
int [] intArray = new int[] {111, 222, 333};
Object [] args = new Object[1];
args[0] = Array.newInstance(int.class, intArray);
method.invoke(aClass, args);I can compile without any error, but when runs, it died in the "invoke" statement with:
Exception in thread "main" java.lang.IllegalArgumentException: object is not an instance of declaring class
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
     at java.lang.reflect.Method.invoke(Unknown Source)
     at Test1.invoke_Method_1(Test1.java:262)
     at Test1.start(Test1.java:33)
     at Test1.main(Test1.java:12)
Any help is greatly appreciated!
Jeff

Sorry, my bad. I was able to invoke static methods and instance methods with all data types except native int, short, double and float, not sure the proper ways to declare them.
After many frustrating hours, I posted the message for help, but at that time, my mind was so numb that I created a faulted example because I cut and pasted the static method invocation example to test the instance method passing int array argument.
As your post suggested, "args[0] = intArray;", that works. Thanks!
You know, I did tried passing the argument like that first, but because I was not declaring the type properly, I ended up messing up the actual passing as well as the instantiation step.
I will honestly slap my hand three times.
jml

Similar Messages

  • How do you manually manage podcasts with the new iTunes?

    Like the subject line says: How do you manually manage podcasts with the new iTunes?
    With the previous version of iTunes, when I plugged in my iPod, I could select the iPod, select podcasts, and manually delete episodes. With the new iTunes, I can't select individual episodes when looking at my iPod through iTunes. Is my only option to Sync? If so, why is that my only option?
    This question probably has a simple answer, and I'm just not seeing it.

    Rock,
    I think I figured out a way to do what you want to do - which is the same way that I use Itunes with my Ipod. (My Itunes libary was destroyed last year so I can no longer auto synch my Ipod as I would lose thousands of songs).
    Funnily enough, I discovered this new way of manually moving podcasts while trying to figure out what cpragman was trying to say (I never could - he must be smarter than me, as I couldn't get his method to work).
    1. Open up your Itunes in your regular Library view. Choose Pocasts from the left hand side (either in the sidebar if you have that enabled, or from the little "radio" icon if you don't.)
    2. Mouse to the podcast you want to place on your Ipod.
    3. Right-click it.  A long menu will pop up.
    4. Move to the "Add to Playlist" option.  As you hover, all your playlists will be visible. But at the very top will be the name of your Ipod itself (whatever you named it originally).  Choose THAT name, and voila! That podcast will now copy to your Ipod and be easily available when you disconnect.
    A nice feature of this method is that you can shift-click several podcasts at once and do the same thing, and all your selected podcasts will copy over (if you're like me and update your Ipod only every few weeks).
    Hope this helps - let me know if it works for you!

  • How to call a AM method with parameters from Managed Bean?

    Hi Everyone,
    I have a situation where I need to call AM method (setDefaultSubInv) from Managed bean, under Value change Listner method. Here is what I am doing, I have added AM method on to the page bindings, then in bean calling this
    Class[] paramTypes = { };
    Object[] params = { } ;
    invokeEL("#{bindings.setDefaultSubInv.execute}", paramTypes, params);
    This works and able to call this method if there are no parameters. Say I have to pass a parameter to AM method setDefaultSubInv(String a), i tried calling this from the bean but throws an error
    String aVal = "test";
    Class[] paramTypes = {String.class };
    Object[] params = {aVal } ;
    invokeEL("#{bindings.setDefaultSubInv.execute}", paramTypes, params);
    I am not sure this is the right way to call the method with parameters. Can anyone tell how to call a AM method with parameters from Manage bean
    Thanks,
    San.

    Simply do the following
    1- Make your Method in Client Interface.
    2- Add it to Page Def.
    3- Customize your Script Like the below one to Achieve your goal.
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("GetUserRoles");
    operationBinding.getParamsMap().put("username", "oracle");
    operationBinding.getParamsMap().put("role", "F1211");
    operationBinding.getParamsMap().put("Connection", "JDBC");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    return null;
    return null;
    i hope it help you
    thanks

  • Invoking Custom Methods with MiniButtons Not Working

    Hi Experts,
    I followed the steps in the Siebel 7.8 doc exactly to invoke method with
    miniButton, but it gave me error:
    The specialized method 'MyTest' is not supported on Business Component
    'Account' used by Business Object 'Account'.(SBL-DAT-00322)
    The steps I copied from the doc shown below, is the doc wrong in certain
    step or anything else I need to take care? I also checked the Siebel
    SupportWeb about the error code, but didn't seem to solve this simple test
    case.
    Any help is appreciated!
    Michelle
    Invoking Custom Methods with MiniButtons
    Be sure to set up Tools for the appropriate Target Browser Group.
    To invoke a custom method with a MiniButton
    1. Choose an applet (for example, Account List Applet) and create a
    control with the following properties:
    Name = ButtonTest
    Caption = Test
    HTML Type = MiniButton
    Method Invoked = MyTest
    2. Right click the Applet and choose Edit Web Layout.
    The Web layout editor appears.
    3. Change the template mode on the Web Controls toolbar to 3: Edit
    List.
    A window opens with the available controls, including the one you just
    created.
    4. Drag and drop the control the ButtonTest control onto an available
    location. When you release the mouse button, the button appears.
    5. Click Save and then choose File > Close.
    6. To add a server script to the applet that enables the button,
    right-click the applet and choose Edit Server Scripts. Add the following
    script to the WebApplet_PreCanInvokeMethod() function.
    function WebApplet_PreCanInvokeMethod (MethodName, &CanInvoke)
    if ( MethodName == "MyTest" )
    CanInvoke = "TRUE";
    return( CancelOperation );
    return (ContinueOperation);
    7. Add the following browser script to the applet you are using (for
    example, the Account List Applet).
    function Applet_PreInvokeMethod (name, inputPropSet)
    switch (name) {
    case "MyTest":
    alert( "Siebel 7 browser script!" );
    return("CancelOperation");
    break;
    return ("ContinueOperation");
    8. Run any application that has access to accounts, and go to the
    Accounts screen.
    The new button should appear.
    9. Click Test.
    The Browser Script should display an alert box indicating "Siebel 7
    Browser Script!"

    Hi
    As said above I have tried with Account List Applet and created a new control with MethodInvoked Property=Test; HTML Type=Button and added to the weblayout
    2.Enable the new button on the applet
    Applet--->Server Script
    function WebApplet_PreCanInvokeMethod (MethodName)
    if(MethodName=="Test")
    CanInvoke="True";
    return(CancelOperation);
    return (ContinueOperation);
    3.Applet--->BrowserScript---->
    function Applet_PreInvokeMethod (name, inputPropSet)
    if(name=="Test")
    alert ("Your Result is success")
         return ("ContinueOperation");
    when clicked on button it was throwing following error:
    Siebel Error Message SBL-DAT-00322: The specialized method is not supported on Business Component ' used by Business Object .
    gone through support web and read possible reasons but I am not able to find out where I was wrong
    I am using siebelV 7.7 ; Applet is using Class:"CSSFrameListBase". It is not a Copied applet.
    Could you please suggest me.
    Thank You,

  • How do you highlight several cells with the mouse in numbers

    how do you highlight several cells with the mouse in numbers

    Hi David,
    Using only the mouse, you can select a contiguous range of cells using the method described by dwb.
    For larger (but still contiguous) ranges you might prefer this method:
    Click the first (top left) cell of the desired selection.
    Scroll to the last (botom right) cell of the desired selection.
    Shift-click the bottom right cell to select it, and all of the cells in the rectangular array defined by this and the top left cell selected in step 1.
    To select two or more non-contiguous cells:
    Click on the first to select it.
    Command-click on another to add it to the selection.
    Repeat as necessary.
    Regards,
    Barry

  • How do you associate a view with a form?

    How do you associate a view with a form and make it accessible in the form?

    Try this
      <Field name='myview'>
                        <Display class='Text'>    
                            <Property name='title' value='My View'/>
                        </Display>
                        <Derivation>                       
                            <invoke name='getView'>
                                <ref>:display.session</ref>
                                <concat>
                                    <s>User:</s>
                                    <ref>accountId</ref>
                                </concat>                       
                                <map>
                                    <s>authorized</s>
                                    <s>true</s>
                                </map>
                            </invoke>
                        </Derivation>
                    </Field>           
                    <Field name='myview.waveset.organization'>
                        <Display class='Text'>    
                            <Property name='title' value='User Org'/>
                        </Display> 
                    </Field>

  • EL - How do you call a method that requires a parameter

    How do you call a method that requires a parameter
    In scriplet code here is what I am trying to do
    <%= car.getDefaultColor(car.getCarType()) %>
    How do I do this in EL
    Here is my guess (it generates the Exception described below)
    ${car.defaultColor(car.carType)}
    Here is the Exception I am getting:
    javax.servlet.ServletException: <h3>Validation error messages from tag library c</h3>tag = 'out' / attribute = 'value': An error occurred while parsing custom action attribute "value" with value "${car.defaultColor(car.carType)}": Encountered "(", expected one of ["}", ".", ">", "gt", "<", "lt", "==", "eq", "<=", "le", ">=", "ge", "!=", "ne", "[", "+", "-", "*", "/", "div", "%", "mod", "and", "&&", "or", "||"]
    Any Ideas?
    P.S. If it matters to you, I am using JSTL 1.0 and the code snippets above are actually within the value attribute of a <c:out value="" /> statement.

    How do you call a method that requires a parameter
    In scriplet code here is what I am trying to do
    <%= car.getDefaultColor(car.getCarType()) %>
    How do I do this in ELYou don't. EL is very strict in method signatures. All get methods must be public Type getProperty(void); And all set methods must be public void setProperty(Type t);
    So you will have to re-work your Bean so it does not need an argument to the get method (getDefaultColor()). Since you are calling another method out of car, you might re-write the getDefaultColor method as such:
      public Object getDefaultColor() {
        CarType ct = this.getCarType();
        //then do other stuff
      }If that isn't suitable, then provide a helper method that is used to set the current car type and then call the getDefaultColor:
      private CarType curCarType;
      public void setCurrentCarType(CarType ct) { curCarType = ct; }
      public Object getDefaultColor() {
        if (curCarType == null) throw new IllegalStateException("CarType must be set before getting color");
        //normal work using curCarType
    <c:set target="${car}" property="currentCarType" value="${car.carType}"/>
    <c:out value="${car.defaultColor}"/>It is better to do as little of the data manipulation (setting up the car type) in the JSP as possible, so the first option is better than the second. Also better then the second would be to set the current car type in a servlet or data access object (or wherever) from which your retreive the car to begin with. Manipulatig it in the JSP itself should be your last resort (to keep as much business logic out of the JSP as possible).
    Here is my guess (it generates the Exception
    described below)
    ${car.defaultColor(car.carType)}
    Here is the Exception I am getting:
    javax.servlet.ServletException: <h3>Validation error
    messages from tag library c</h3>tag = 'out' /
    attribute = 'value': An error occurred while parsing
    custom action attribute "value" with value
    "${car.defaultColor(car.carType)}": Encountered "(",
    expected one of ["}", ".", ">", "gt", "<", "lt",
    "==", "eq", "<=", "le", ">=", "ge", "!=", "ne", "[",
    "+", "-", "*", "/", "div", "%", "mod", "and", "&&",
    "or", "||"]
    Any Ideas?
    P.S. If it matters to you, I am using JSTL 1.0 and
    the code snippets above are actually within the value
    attribute of a <c:out value="" /> statement.

  • How do you get a line with MULTIPLE fields to WRAP ?

    How do you get a line with MULTIPLE fields to WRAP ?
    Good afternoon everyone...
    THE PROBLEM: Why doesn’t a line with multiple fields WRAP?
    HYPOTHETICAL EXAMPLE/WHAT I”D LIKE TO SEE
    If I have 2 fields on a line (this is now a hypothetical example and nothing to do with my actual report)….let’s call them field A and field B. And if field A has values of all ‘X’ and field B has values of all ‘Y’…then….the normal case would be (ignore dots – only for spacing):
    A……………………… B
    XXXXXXXXXXXXXXXXXX YYYYYYYYYYYYYYYYY
    But what if A is too long? I would want to see B wrap onto the next line like this:
    A……………………………………………………B
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX YYYYYY
    YYYYYYYYYYYYY
    And similarly….if B is extra long, can the line print as:
    A………………………. B
    XXXXXXXXXXXXXXXXXXX YYYYYYYYYYYYYYYYYYYYYYYYYYY
    YYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
    I don’t want the case where B is long and I get:
    A………………… …B…
    XXXXXXXXXXXXXXXXX YYYYYYYYYYYYYYYYYYYYYY
    ………………………..YYYYYYYYYYYYYYYYYYYYY
    I can see how you can wrap an individual field like that…but how can you WRAP a line of[b] fields within the frame so it wraps to the BEGINNING of the frame on next line?
    My SPECIFIC CASE
    I have a report that I have stripped down to a simple structure for the purposes of this explanation.
    My DATA MODEL has the main QUERY (for plant family and species data). The columns of the query are divided into 2 groups. The 1st GROUP contains the family data. Below that is the rest of the species data in a 2nd GROUP.
    Linking from the 2nd species group (above) is a new QUERY to extract REGION data based on the common key field. Under this 2nd query is another group with all the REGION columns.
    The LAYOUT MODEL has a group frame (the main , base one)
    On top of this is a repeating frame based on the 1st group (family data).
    On top of this is another repeating frame for the 2nd group (species data).
    On top of this is 2 Frames on the same line line. The 1st frame contains columns from the species group .
    The 2nd frame on this line is a repeating frame. The PRINT DIRECTION for this frame is ACROSS/DOWN. It repeats details of the REGION where the species is found. These columns come from this group come from the REGION QUERY and GROUP.
    All fields on the report line have variable horizontal elasticity.
    The problem is that when there is too much data on the line, it does NOT WRAP to the 2nd line.. It TRUNCATES.
    Can the line be made to WRAP????..
    In my current report, 1 of 2 things is happening:
    1) All fields print on the line until it hits the page boundary and then it just stops. Truncated!
    2) All fields print on the current line, then Oracle Reports throws a new page to print the REMAINDER of the long, input line
    But I would like a LONG line to continue printing onto the following line of the same page.
    I have tried all combinations of the elasticity fields and the ‘ADVANCED LAYOUT’ properties.
    I have been focussing my attention with this problem on the frames .
    We are using REPORT BUILDER V 6.0.8.26.0
    Thankyou to anyone who may offer assistance.
    Tony Calabrese.

    Steve,
    you gain 1 thing, but you lose something else!
    This thing is SO frustrating!
    Hey Steve! Good afternoon.
    I've done as you suggested....I have a long text boilerplate item - the only 1 on the line...and it has all the column in it.
    So it looks like:
    &col1 &col2 &col3 &col4 &col5 etc etc etc
    And the line expands nicely to each field's requirements.
    And when it gets to the right page boundary...it WRAPS to the next line! Beautiful!!!
    The only thing is that...when I had individual fields across the line I was able to create format triggers for those fields. And in doing so I was able to reduce the font and change the justification. I had to do that because some of the fields had to appear superscripted.
    So I wanted something like (ignore the dots):
    ...................................ppppp
    AAAA BBBB CCCCC DDDD EEEE FFFFFF
    So the field of 'ppppp' appeared slightly higher on the line than the other fields...
    I can't see how I can do this with a single TEXT field containing all the &COL values.
    Have you ever come across anything like this?
    Thankyou again,
    Tony Calabrese 12/4/2007

  • How do you pay for apps with credit on your account from an itunes gift card that has already been redreemed and the credit id on the account?

    how do you pay for apps with credit on your account from an itunes gift card that has already been redreemed and the credit id on the account?

    jen19 wrote:
    how do you pay for apps with credit on your account from an itunes gift card that has already been redreemed and the credit id on the account?
    Just buy something.

  • How can you enable back the Android native Menu button in AIR 2.7?

    I've noticed in AIR 2.7 for Android, that now the bottom icons in Android 3.0 Honeycomb are hidden (replaced by small dots) in AIR 2.7, whereas in AIR 2.6 they were always visible. That's cool. Since the bottom bar can never be hidden in Android 3, at least now those icons are less visible (unless you intentionally touch the bottom bar, then the icons show up for a few seconds).
    BUT I also noticed in AIR 2.7 compiled apps, the native "Menu" icon is not visible anymore, even after touching the bottom bar. In AIR 2.6 you could see and press that button (which can be captured from AIR so you can show a custom settings menu or whatever).
    So, quoting the subject --> How can you enable back the Android native Menu button in AIR 2.7?

    There is a work around and a reason for the menu issue.  Honeycomb doesn't natively support a menu softkey, it is only to support old apps comiled in phone API levels.  If you compile a Honeycomb app in 2.7 or 3.0, it is expected you manage the settings within the larger tablet UI framework.  See below link for more info and work around. 
    http://forums.adobe.com/message/3964792#3964792

  • How do you structure a .book with an EDD?

    Hi all,
    I am learning how to convert legacy, unstructured FM documents into structured FM documents and need some help. So, I created a conversion table from my unstructured documents, created the EDD, applied the EDD to the unstructured document to create a structured document and now need to tweak the EDD.
    My question is, what is the correct way to layout the EDD rules for a book using multiple document styles? For example: My book contains a title page, TOC, one or more chapters, a glossary of terms, and one or more appendixes (or is that a appendicies?.)
    I am thinking the element rule would look something like this:
    Element (Container): BOOK
    Valid as the highest-level element.
    General rule: TitlePage, TOC, Chapter+, Index, Appendix+
    Followed of course by other elements required for the structure. However, I did see an EDD that I am sure was outlined like this (though I can't recall where:)
    Element: TitlePage
    Valid as the highest-level element.
    General rule: Blah blah blah
    Element: TOC
    Valid as the highest-level element.
    General rule: Blah blah blah
    Element: Chapter
    Valid as the highest-level element.
    General rule: Blah blah blah
    Element: Index
    Valid as the highest-level element.
    General rule: Blah blah blah
    Element: Appendix
    Valid as the highest-level element.
    General rule: Blah blah blah
    If the second structure is correct, how do you define the Book element? On the Adobe forum, I was told one EDD should be created for all book elements, which makes sense to me.
    Okay people, fire away. Remember I am a neophyte in structured FM.
    Thanks,
    Adam

    Thanks Van, that does clear it up for me... a little. My confusion now is, if I set all the book sections as valid at the highest level, then how does the book get structured as the starting point for the sections contained within it? I have tried to find a sample EDD detailing exactly this, but to no avail - my search brought up courses where this is covered, but not the actual EDD structure.
    When I try to structure the book with the EDD, the book comes up red with its children elements looking just fine. Ahh! You have to love that learning curve.
    Regards,
    Date: Thu, 24 Sep 2009 06:43:41 -0600
    From: [email protected]
    To: [email protected]
    Subject: How do you structure a .book with an EDD?
    Adam,
    Following up on some of Russ's sage advice, you asked:
    If the second structure is correct, how
    do you define the Book element? On the Adobe forum, I was told one EDD
    should be created for all book elements, which makes sense to me.
    As Russ said, your BOOK element looks fine. Not sure how far you have gotten, but when you open a document file that is in the book, its root element will be Chapter, TitlePage, Appendix, etc. That is why you have to declare each of these as being valid at the highest level. When you click in the book file window and look at the structure view, you will see that the BOOK element is the root element, and its content will be TitlePage, TOC, Chapter, Chapter,...etc. The book and all of its component files have the same EDD. The definitions for the BOOK element, as well as the TitlePage, TOC, Chapter, etc elements are all contained in the same EDD. I hope this helps to answer your question.
    Van
    >

  • HT204382 How do you read AVI sequences with Quick Time Player ?

    How do you read AVI sequences with Quick Time Player ? H2OT

    Hope somebody will help, I downloaded Flip4MacWMV 2.4.4.2dmg as recommended but it did not work. can I get HELP? Thanks

  • Please please can some one tell me how do you charge ur ipad with ur laptop. it doesn't chage wen I put use the wire. only charges when I plug the socket in.

    please please can some one tell me how do you charge ur ipad with ur laptop. it doesn't chage wen I put use the wire. only charges when I plug the socket in. Iv never used an ipad b4 so don't really know much. Hope some one knowz.

    The quickest way (and really the only way) to charge your iPad is with the included 10W or 12W USB Power Adapter. iPad will also charge, although more slowly, when attached to a computer with a high-power USB port (many recent Mac computers) or with an iPhone Power Adapter (5W). When attached to a computer via a standard USB port (2.5W, most PCs or older Mac computers) iPad will charge very slowly (but iPad indicates not charging). Make sure your computer is on while charging iPad via USB. If iPad is connected to a computer that’s turned off or is in sleep or standby mode, the iPad battery will continue to drain.
    Apple recommends that once a month you let the iPad fully discharge & then recharge to 100%.
    How to Calibrate Your Mac, iPhone, or iPad Battery
    http://www.macblend.com/how-to-calibrate-your-mac-iphone-or-ipad-battery/
    At this link http://www.tomshardware.com/reviews/galaxy-tab-android-tablet,3014-11.html , tests show that the iPad 2 battery (25 watt-hours) will charge to 90% in 3 hours 1 minute. It will charge to 100% in 4 hours 2 minutes. The new iPad has a larger capacity battery (42 watt-hours), so using the 10W charger will obviously take longer. If you are using your iPad while charging, it will take even longer. It's best to turn your new iPad OFF and charge over night. Also look at The iPad's charging challenge explained http://www.macworld.com/article/1150356/ipadcharging.html
    Also, if you have a 3rd generation iPad, look at
    Apple: iPad Battery Nothing to Get Charged Up About
    http://allthingsd.com/20120327/apple-ipad-battery-nothing-to-get-charged-up-abou t/
    Apple Explains New iPad's Continued Charging Beyond 100% Battery Level
    http://www.macrumors.com/2012/03/27/apple-explains-new-ipads-continued-charging- beyond-100-battery-level/
    New iPad Takes Much Longer to Charge Than iPad 2
    http://www.iphonehacks.com/2012/03/new-ipad-takes-much-longer-to-charge-than-ipa d-2.html
    Apple Batteries - iPad http://www.apple.com/batteries/ipad.html
    Extend iPad Battery Life (Look at pjl123 comment)
    https://discussions.apple.com/thread/3921324?tstart=30
    New iPad Slow to Recharge, Barely Charges During Use
    http://www.pcworld.com/article/252326/new_ipad_slow_to_recharge_barely_charges_d uring_use.html
    Tips About Charging for New iPad 3
    http://goodscool-electronics.blogspot.com/2012/04/tips-about-charging-for-new-ip ad-3.html
    How to Save and Prolong the battery life of your new ipad
    https://discussions.apple.com/thread/4480944?tstart=0
    Prolong battery lifespan for iPad / iPad 2 / iPad 3: charging tips
    http://thehowto.wikidot.com/prolong-battery-lifespan-for-ipad
    iPhone, iPod, Using the iPad Charger
    http://support.apple.com/kb/HT4327
    Install and use Battery Doctor HD
    http://itunes.apple.com/tw/app/battery-doctor-hd/id459702901?mt=8
    To Extend a Device’s Battery Life, Get to Know It Better
    http://tinyurl.com/b67c7xz
    iPad Battery Replacement
    http://www.apple.com/batteries/replacements.html
    In rare instances when using the Camera Connection Kit, you may notice that iPad does not charge after using the Camera Connection Kit. Disconnecting and reconnecting the iPad from the charger will resolve this issue.
     Cheers, Tom

  • Connected to tv.how do you fill the screen with the ipad

    Have connected to tv all ok but how do you fill the screen with the mirror image from the ipad

    Yes I have the iPad cable bought from apple

  • How do you start a loop with an event and end the loop when u release ....

    How do you start a loop with lets say an event of some sort, whether it be holding down a key or pressing the mouse click and then stopping the loop when you release that key or mouse button.?
    double c = 1.8, i = 1, max = 90, exp = 0;
    final double inc = 0.002; //speed at while it increases
    boolean f = false, g = false;
    while (true)
        while (f == false && stopMeter == false) //increasing speed going up to 90
            exp = Math.pow (c, i);
            i += inc;
            pAngle.setText (Math.round (exp) + "");
            if (exp > max)
                f = true;
                g = false;
            } //end if
        } //end while
        while (g == false && stopMeter == false)  //decreasing speed going down from 90
            exp = Math.pow (c, i);
            i -= inc;
            pAngle.setText (Math.round (exp) + "");
            if (exp < 1)
                g = true;
                f = false;
            } //end if
        } //end while
    } //end whilethis is a snippet of my increasing increments. Its for an angle meter. I can't get it to stop, when the user clicks or does something... the program just gets stuck in an infinite loop. I am still new to java and i do not know how to fix this.

    You are in the wrong forum. Try this one instead: http://forum.java.sun.com/forum.jspa?forumID=31
    /M

Maybe you are looking for

  • RisPort returns NULL in Response

    Hi all, I'm trying to write a little Java application that fetches information about phones currently registered on a CUCM 6.1 cluster. I've generated Java classes from the WSDL using AXL 1.4's WSDL2JAVA tool. The code below is using these classes to

  • "message could not be delivered"

    MAILER-DAEMON are replying that message can not be delivered when sendin to my mac addresses!? this started last night. I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below. For furth

  • Download Skype 7.0.60.102 Offline installer 07-01-...

    Download Skype 7.0.60.102 Offline installer Link here | http://www.skype.com/en/download-skype/skype-for-windows/downloading/?source=lightinstaller&ver=7.0.... Have a Nice Day

  • Host to RT target, variable discovery

    Hello all, I am somewhat new to Real-Time (and to LV in general), and am hoping you guys can point me in the right direction. My company is just starting to use sbRIO and cRIO hardware, and we would like to duplicate an existing host-to-target commun

  • Unable to move app downloaded on my pc to iPad using iTunes!

    Hi, I downloaded FIFA 14 app using iTunes in my PC. But I'm unable to transfer the .app file onto my iPad! Please help me how to move the app from mypc to ipad?