How to stop ActionEvent for a button

Hi,
I have a button "Start". On clicking the button, it will ask with a prompt "You really want to start" with Yes and No button. On clicking Yes button, the "Start" button is changed to "Cancel Stat..." and start running a process. If want to stop the process I have to click "Cancel Start..." button. But on clicking "Cancel Start..." button it again asks with the prompt "You really want to start" with Yes and No button. This should not happen.
Please help me regarding this issue.
Thanks in Advance....

On click of Start button, a prompt with Yes No button will be displayed.
On clicking Yes button, a process starts in a Thread and the button Start is changed to Cancel Start...
Now I have to stop the process that runs in the Thread
So, in the actionPerformed method, I have a flag and whenever the Cancel Start... is flipped, the process should be stopped which takes 1 min since a big query is taking a min to stop...
So, I can't give another text as Cancelling.... but I'm setting the text as "Start"
void cmdCancelStart_actionPerformed(ActionEvent e)
     isStop = true; //flag
     csv.isStopRequested(isStop); //The method used to stop the process
     cmdCancelStart.setBackground(Color.lightGray);
cmdCancelStart.setText("Start"); //For name sake I'm setting as Start if not it will be as "Cancel Start..." and only after 1 min it will change to "Start".
So, how I can overcome this?
Thanks in Advance...
}

Similar Messages

  • How to set value for radio button in sap crm survey suite

    Hi ,
    I created a survey in CRM Service, in which I added a question with answer as '10 Selection Button Group ('radio button'). And answer has 11 answer options (which means 11 radio buttions). Now when we test the survey, the value for the radio buttons is appearing like 'id_0050569b03091ee480a29d8ee61e953c'. But i want to set a specific value for each radion button (from 1 to 11). So, how to set value for radio button in sap crm survey suite???.
    Thanks & Regards,
    Seshu

    Hi,
    I found solution myself. Click on Goto -> Editing Mode -> Expert Mode. Now you can set value for radio button.
    Regards,
    Seshu

  • How to stop a "for" loop

    Hello,
    Do you know how I can stop a for loop ? because when I click on the stop switch on my front panel, the VI don't stop and continue to run the loop.
    Peter.
    Labview 2010
    Solved!
    Go to Solution.

    Peter,
    It sounds like you need a while loop, not a for loop. A button or switch does not traditionally control iterations of execution for a for loop.
    Please post your code so we may help better.
    -Chazzmd

  • How to stop validation for Back action in ADF

    Hi,
    In ADF form, I have a 'Back' button which should just go back to the previous page. But when I select 'Back' button, the form is validated again and I do get validation error messages.
    How can I stop validation for these type of simple actions?
    Please do let me know.
    Thanks,
    priya.S

    You might find this blog post useful in finding a generic solution to your problem:
    http://one-size-doesnt-fit-all.blogspot.com/2007/02/jdeveloper-and-art-of-rollback.html
    CM.

  • How to create subpicture for a button?

    Hello!
    I have really tried to find the answer to this rather silly problem on my own, but without result. Please help someone!
    The situation:
    I have a menu with three choices: "Play Movie", "Scene Selection" and "Subtitles". Now, the text presenting these choices are part of the background image, created in Premiere (the program I know best). They are written with an old typewriter to get that gritty feeling.
    I want the user to scroll between these "menu items". The currently selected item should be indicated by a black circle/spot/dot before the text of the item. By default, when the menu appears, there is a black circle in front of (to the immediate left of) the item "Play Movie". The user should now be able to step with his/her remote to the other items, thereby making the black circle in front of "Play Movie" disappear and appearing instead before some of the other items. In short: the black circle is always showing before the currently selected item. OK, I got a bit verbose there, but the idea got across hopefully. One more thing: the background color is 100% white.
    Up to this point, my solution was this: I placed black circles (small images with gradation and all, very nice looking) in front of ALL THREE ITEMS. Then I convert these into buttons. Then I choose the color set for the menu so that the unselected state is 100% white, plain and simple, with 100% opacity, thereby covering the black circles that should not show. Only in the selected and activated states does opacity for the button subpicture drop to 0%, thereby revealing the black circle that should be seen.
    The problem? Well, on some DVD-players (not on the XBOX 360 though), when an item is activated, all three circles show for a brief moment before the selected action starts (for example playing the movie). It also happens in Encore Preview. This is not logical at all and looks amateurish. I don't know why it happens, but my guess is that it wouldn't if I did this the "correct" way: by creating subpictures fo the buttons in the shape of circles. I understand the nice looking gradations must go out the window but that is a price I'm willing to pay.
    But now I run into an unexpected problem: I don't understand how to create a subpicture for the button that is a black circle. It seems the documentation in Encore and on forums in general takes for granted that you know how to do this.
    What I tried ws this: I created a monochrome, small image in bmp format - a black circle on white background. But this image just shows up as a black rectangle in Encore.
    What should I do? I should add that I have no real experience with Photoshop, so go slow if you go there.
    Regards,
    Nikolaj

    Basically, when one realizes the limitations of the Sub-picture Highlights, as set by the DVD-specs., it's easy to see the "workaround."
    A couple of the aspects of Sub-picture Highlights are:
    1.) 2-bit color (either ON, or OFF), from a limited color palette, with degrees of Transparency (the opposite of PS's Opacity).
    2.) they will appear on top of anything else on the Menu, including things like Button text/graphics.
    By constructing your Sub-picture Highlight in PS, you can use Masking to define where it will be, and where it will not be. In the case that prompted my article, the poster had a series of Text Buttons, and the Sub-picture Highlights were formed from that Text. The poster did not like the look of those 2-bit jagged blocks of color overlying the Text in the Button. The workaround is to "punch a hole" in the Sub-picture Highlight, so that it is hollow, where the Button's Text appears. This is done in PS, by using the "outline" of that Text to create a Mask for the Sub-picture Highlight. The jagged aspect can be adjusted a bit, by using a degree of Transparency (set in the non-Auto Color Set back in Encore). We still have a 2-bit color Sub-picture Highlight, and it still overlays the Button's Text, but now there is a hole in it, right where the Button's Text is located, and it is seen through that hole. The introduction of Transparency has the visual effect of "softening" the look of the 2-bit color, even though the jagged edges are still there - they just look softer. I went on to show how one could even use a second Sub-picture Highlight, that is just a bit larger than the first, and with more Transparency to simulate a "glow." Now, we cannot have a real "glow," because we are limited to that 2-bit color for the Sub-picture Highlight, but we can simulate it.
    Much of what a designer does is really slight of hand - illusion. They all have to work within the limitations of the DVD (or BD) specs., but with a bit of creativity, planning and some work in PS and Encore, they can create enough smoke and use enough mirrors to fool the user into believing that what they think they see skirt the DVD-specs. They do not, but that's where the illusion comes in.
    We get a lot of questions from people, who claim that one commercial DVD, or another, has full-color Sub-picture Highlights and they complain that Encore cannot do that - only 2-bit Sub-picture Highlights. What they are seeing, but do not realize it, is a dupe Menu, with a full-color graphic, and no real Sub-picture Highlight visible. Jeff gives full details on doing this. Same for those who have seen a Button with a duo-tone thumbnail, that turns full-color, when the Button is navigated to. Wow, how did they do that, and why can't Adobe Encore do that? Well, what they saw was a dupe Menu, with a full-color thumbnail and no visible real Sub-picture Highlight.
    Jeff shows how to create what appears to be at least a 3-color Sub-picture Highlight. It's really just 3 regular 2-bit color Sub-picture Highlights, with Masking to create the illusion that he beat the DVD-specs. Neat! [Being from the USA, I also liked that he used the US flag, but he could have chosen the French "Tri-color," or any other flag, without artwork.]
    These are all just tricks, but if the user buys into the illusion, who's to know?
    Enjoy,
    Hunt
    PS - though many of the great, older posts were lost, when the forum changeover happened, I strongly suggest reading the posts here. You can bypass ones that do not offer you anything, but almost every possible illusion has been discussed at least one time, and likely many, with some different workflows offered by those, who replied. Great reading.

  • How to stop request for admin password when sending files to trash?

    I am requested the admin password when ever sending a file to trash using the mouse or the context menu.
    How to stop this annoying request?
    It was not like this before.
    I am working on a non admin account for security reasons. I got admin details here of cause.
    Thanks for you help!
         Till Kopper

    I gave my working account admin abilities in the system preferences. logged out and back in. Run the command line "sudo rm -rf ~/.Trash" as Topher Kessler suggested. Now my own password was accepted (before this ine and the admins accounts one failed). No there is no annoying request for the admin passowrd when sending a file to trash. changed my work account for no admintrative in the system prefs and logged out and in.
    Problem solved.
    THanks to Topher Kessler!
    (how to give you now the 10 point you deserve?)

  • How to stop suggestions for words when texting

    How do I stop suggestions for words when texting?

    Settings>General>Keyboard>Auto-Correction>Off.

  • Touch Events: How can I check for a button being pressed while another button is being held down?

    Hello,
    I'm trying to check for a button being pressed while another is down through Touch.  In my case, I' m making a game and I need for a button to make the character jump.  However, when I hold down right, I notice that the jump button becomes somewhat unresponsive and I have to press it twice or more to get it to trigger, as opposed to just pressing the jump button by itself with nothing held down which works fine.  I'm testing this on my Motorola Droid 2.
    Here is some of my code that demonstrates text instead of my character moving around:
    package  {
         import flash.events.TouchEvent;
         import flash.ui.Multitouch;
         import flash.ui.MultitouchInputMode;
         public class Document extends MovieClip {
               Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
               private var controls:BottomBar;
               private var debugText:String;
               public function Document() {
                    addIngameGUI();
               private function addIngameGUI(){
                    controls = new BottomBar();
                    controls.y = stage.stageHeight - controls.height;
                    addChild(controls);
                    controls.aBtn.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
                    controls.bBtn.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
                    controls.leftArrow.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
                    controls.rightArrow.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
             private function testBtns(event:TouchEvent){
                   debugText.text = event.target.name;
    What am I doing wrong?  Is there a better approach?
    Thank you in advance.

    Hello,
    I'm trying to check for a button being pressed while another is down through Touch.  In my case, I' m making a game and I need for a button to make the character jump.  However, when I hold down right, I notice that the jump button becomes somewhat unresponsive and I have to press it twice or more to get it to trigger, as opposed to just pressing the jump button by itself with nothing held down which works fine.  I'm testing this on my Motorola Droid 2.
    Here is some of my code that demonstrates text instead of my character moving around:
    package  {
         import flash.events.TouchEvent;
         import flash.ui.Multitouch;
         import flash.ui.MultitouchInputMode;
         public class Document extends MovieClip {
               Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
               private var controls:BottomBar;
               private var debugText:String;
               public function Document() {
                    addIngameGUI();
               private function addIngameGUI(){
                    controls = new BottomBar();
                    controls.y = stage.stageHeight - controls.height;
                    addChild(controls);
                    controls.aBtn.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
                    controls.bBtn.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
                    controls.leftArrow.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
                    controls.rightArrow.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
             private function testBtns(event:TouchEvent){
                   debugText.text = event.target.name;
    What am I doing wrong?  Is there a better approach?
    Thank you in advance.

  • How to Disable Check for updates button in Help/About in firefox 5.0

    Hi the user should not manually check for updates so we want to disable the Check for updates button also in Help/About.
    Thanks in advanced

    You can hide that button with code in userChrome.css below the @namespace line.
    * http://kb.mozillazine.org/userChrome.css
    * http://kb.mozillazine.org/Editing_configuration
    You can use the ChromEdit Plus or Stylish extension to have easier access to the customization files.
    * ChromEdit Plus: http://webdesigns.ms11.net/chromeditp.html
    <pre><nowiki>@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
    #aboutDialog #updateBox { display:none!important; }</nowiki></pre>
    You can also choose to lock the related update pref(s) to false if you want to make sure.
    See:
    * http://kb.mozillazine.org/Locking_preferences
    * http://kb.mozillazine.org/about:config

  • How to stop Depreciation for some assets & start again.

    Dear Friends,
    We have a requirement where we have to stop Depreciation for some assets as they are not in use and again post depreciation when they put in use.
    For ex: Asset Value is 10,000 and monthly Depreciation is 100. Asset has been depreciated for first 6 periods in year with 100 each in every month & we want to stop depreciation for coming 3 months and post depreciation when they put in use. Asset should not be depreciated when they are not in use and calculate regular 100 if we run depreciation again if we put in use. So total Depreciation of the asset for the year should be 900 (First 6 Months & last 3 months).
    Please explain step by step process to do this and your kind cooperation to solve this issue is highly appreciated.
    Points will be rewarded for sure if my problem solves.
    Thanks & Regards,
    Naveen Kumar.

    Go to AS03 Asset Master/Dep tab and observe the dep key
    Goto AFAMA and select that dep key and click on assignment of calculation methods
    You can see last row for shutdown field and select YES
    Go to asset master at AS02/Time dependent data and select shutdown check box and enter period
    If shutdown check box is not available goto as03 and goto menu environment-screen layout and master data and identify the screen layout number
    Go to SPRO-Financial Accounting (New)-Asset Accounting-Master Data-Screen Layout-Define Screen Layout for Asset Master Data-Define Screen Layout for Asset Master Data-
    Select your screen layout and click on logical field groups and select 3 (Time dependent data) and click on field group rules and make shutdown field as optional.
    This will allow you to change the shutdownfield asset master data.
    Srinivas

  • How the PCUI event for export button works?

    Hi All,
    After get the order search result in PCUI, when I click the Export button.
    It show me the message that : Microsoft office 2003 or higher is not installed on your computer.
    In fact, I have the office 2003. And I found that the event for Export button is PCF_DL_EXPORT.

    Have you tried double-clicking on the auto complete component in the designer? You should be taken to a method like "autocomplete1_complete". This method is called when the autocomplete gets focus and also for each character typed in the field.
    Cheers!
    -David

  • How to stop accrual for a particular employee.....???

    An employee had availed maternity leave and haven’t come back to work. How do we stop her accruals in the system as she  haven't joined back at work and is not eligible for the annual leaves till she is back in office.
    -thanks

    You can tweak your formula to accrue only if the assignment status is active.
    For this employee, change the assignment status to Leave of absence or suspended, so the accrual does not take place.
    OR
    An easier way
    Have an adjustment entry which feeds into the accrual plan.
    You can then add or subtract for specific employees.

  • How to stop Firefox for Androids crashing on my Kindle Fire.

    Installed OK but when I open, opening page appears, lasts ~5 seconds, then disappears. How can I stop this?

    Firefox for Android is known to crash on the Kindle HD. We have a development version that should resolve the crash at http://nightly.mozilla.org

  • HT204088 how to stop payment for purchases which is not of quality

    i have paid susbcription for fring 6 times by mistake because it is not working in iphone 4s ios 6.pls advice. i want to stop payment made through itunes

    Hi,
    First and foremost let me advice you to be very careful while doing this.
    For Rescheduling
    RSPC> chain > Goto > Planning view and
    click on Execution tab > select > Remove from Schedule and then in Maintain variant of start process reschedule for the day you require it to run.
    For terminating active chain
    You can start from SM37, find the process WID/PID then go to SM50 or SM51 and kill it. Once its done come back to RSMO and check the request, it should be red but again manually force to red and save by clicking on the total status button in the status tab. This shuld ensure that the process is killed properly.
    The next step will be to go to targets that you were loading and remove the red requests from those targets.
    Note: For source system loads you may have to check if the request is running in the source system and kill if needed and pull it again.
    But for BW datamart delta loads u may have reset the datamarts in case u are going to pull the delta again.
    Re: Kill a Job
    Re: Killing a process chain.
    Regards,
    JituK

  • How to Handle Events for JOptionPane buttons?

    Hi All,
    I need a help...
    I am trying to develop a simple SWING application that consists of multiple elements (mainly text fields) and a Submit button. On pressing Submit button, it should validate all the fields and then do something else. But if some fields are left blank, then it should give a pop-up message and on clicking the OK button on the pop-up message, the focus should go to that text field which is left null.
    The problem is I am not able to understand how to Capture this OK button click-event of the pop-up message. I mean how to do something when the OK/Cancle button of the pop-up window is clicked.
    Please Help me.
    Thanks in Advance,
    Ujjal

    As already pointed out, JOptionPane has some static methods which show a dialog, and return an int, or a string. The whole point of this class is to remove the need for any event handling by the developer, that is, you simply call the showDialog method or whatever, and it returns a value telling you, for example, which button was pressed - no need for action listeners at all. The result of the showDialog method (or whichever you use) tells you which button was pressed. Check the javadocs for JOptionPane for details of several constants that indicate which button was pressed
    The class exists to make simple dialogs trivial to generate - you're overcomplicating things!

Maybe you are looking for

  • Add a Customizable Slideshow | Adobe Muse Feature Tour | Adobe TV

    Drag and drop a fully customizable slideshow widget for an easy, eye-catching way to display a series of images. http://adobe.ly/I5cONW

  • Office 2010 workaround?

    Does anyone have any idea on a workaround to allow HotSync to connect to Outlook 2010?  When I sync, I'm receiving the following error: Outlook Calendar synchronization completed with messages Duration: 0.6 seconds Outlook Calendar The currently inst

  • Order Entry (VA01) to a batch process

    I am looking at turning order entry into a batch process.  I will have many flat files (each being an order with many line items) stored in a directory and I want to run a batch program to grab those files and create orders based off those files.  Ca

  • TKL MDS 9000 Best Practices Discussion

    TKL MDS 9000 Configuration best practice discussion forum This is a discussion forum for TKL and other customers who would like to ask for questions around best practices followed for configuring the MDS 9000 platform a core in Data Center storage ne

  • ADDR1 structure fields

    i want to know the table for ADDR1 structure fields for company code  wise and  customer wise separately. Please suggest me.