How to set jButton to display hourglass while executing.

Hi All,
How to set jButton to display hourglass while executing.
Here is my code:
    private JButton jButton5 = new JButton();
    jButton5.setText("Refresh");
    jButton5.setBounds(new Rectangle(805, 35, 145, 25));
    jButton5.setBackground(Color.green);
    jButton5.setFont(new Font("Tahoma", 1, 15));
    jButton5.setForeground(Color.blue);
    jButton5.setSize(new Dimension(145, 25));
    jButton5.setModel((ButtonModel)panelBinding.bindUIControl("Execute",jButton5));Thanks.

user38000 wrote:
I do not have much experience with Java, my background is database admin, could you please spell out syntax and where introduce hourglass behavior based on the code I posted.While bobear may post his code, my recommendation in this situation is that you are always better to use the advice given, the API and the tutorials to first try to do this yourself and see what happens. Then if it fails, come back with your code attempt.
One concern of mine, and my main reason for posting is that it seems like your JButton will initialize a task that may take a bit of time to perform (hence the need for the hour-glass). I just want to make sure that you call this task in a background thread such as within a SwingWorker's doInBackground() method. For more on this, please google the Sun tutorial on Concurrency in Swing.
Much luck!

Similar Messages

  • How to display hourglass while ADF view link is retrieving rows in a swing.

    I posted this yesterday but did not get a solution, here is my posting again:
    Hi All,
    I have an ADF panel which includes several interdependent ADF View Objects and View Links. The query of the top view object might return several rows, then once user navigates from 1st to second row and so on, the dependent (child) view links display corresponding data. This is a swing app and not a web or jsf app.
    Sometimes it might take 8 to 12 seconds for the corresponding data from child view links to be retrieved, during this time window the ADF Panel might appear to be frozen to the user.
    So my question is what do I have to do so the ADF Panel would display hourglass while it is retrieving the rows for the corresponding child view links. If I have to manually update the java generated by Jdev, then what java line and where would I introduce it?
    Your inputs are most appreciated.
    Thanks.

    Check af:progressIndicator , af:statusIndicator
    http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/doc/tagdoc/core/progressIndicator.html
    http://download.oracle.com/docs/cd/E15051_01/apirefs.1111/e12419/tagdoc/af_statusIndicator.html

  • How to display hourglass while ADF view link is retrieving rows.

    Hi All,
    I have an ADF panel which includes several interdependent ADF View Objects and View Links. The query of the top view object might return several rows, then once user navigates from 1st to second row and so on, the dependent (child) view links display corresponding data.
    Sometimes it might take 8 to 12 seconds for the corresponding data from child view links to be retrieved, during this time window the ADF Panel might appear to be frozen to the user.
    So my question is what do I have to do so the ADF Panel would display hourglass while it is retrieving the rows for the corresponding child view links. If I have to manually update the java generated by Jdev, then what java line and where would I introduce it?
    Your inputs are most appreciated.
    Thanks.

    from the component palatte drag n drop this component into your jsf page.
    more info:
    http://download.oracle.com/docs/cd/E15051_01/apirefs.1111/e12419/tagdoc/af_statusIndicator.html
    Using javascript you can change the mouse cursor to an hourglass. Try using clientListener within commandButton and use javascript.
    document.body.style.cursor = "wait";
    document.body.style.cursor = "default";
    Edited by: Puthanampatti on Jan 12, 2010 1:56 PM

  • How to set max row display rows in PO's PLD

    Hi,
    How to set max row display rows in PO's PLD
    Thanks and Best Regards
    Bruce

    Hi
    Max. Rows per Page is depend on PLD Settings and Depend on Repetitive Area Fieds Height.
    Try this,
    1st Case:
    ->> Administration Module.
    ->> System Initialization.
    ->> Open the Print Perferences Window.
    ->> Click General Tab on Print Perferences Window.
    ->> Assign the Max. Rows per Page - 99 (or) your wishes.
    ->> Update the Print Perferences.
    2nd Case:
    ->> Open your PLD.
    ->> Choose Repetitive Area on Field Index Window.
    ->> Click Format Tab on Properties Area Window.
    ->> Assign the Lines in Repetitive Area - Your Wishes .
    ->> Save the PLD.
    Regards,
    Madhan.

  • How to restrict user at selection screen while executing in background mode

    hi all,
    how to restrict user at selection screen while executing in background mode
    Regards
    Deepak

    Hi,
    We can get the Program whether this is running in background or not then we need to use SY-BATCH, if the SY-BATCH is set to X then the program is running in Background,
    so in the INITIALIZATION event, you can use this SY-BATCH and check the User names, and give the error messsage which you want to restrict
    Regards
    Sudheer

  • How to set up my display to be the main view HELP

    How to set up my external display automatically work as the main display when plugged into my MacBook Pro. I had it set up to work this way on my old MBP but I got a new MBP with Mountian Lion and the Display set up seen different and I can figure out how to make my Apple HD display (about 3 years old) be the main display when I turn on my MBP. Mirror is off when I look at
    System pref’s – Display – Arrangement I just get to pick which display is left and right. I cant remember how it was set up on my old MBP. Mirroring does me no good. Any help will do!!!
    Thanks Brad

    In System Preferences > Displays > Arrangement tab.  Drag the little grey rectangular "menubar" to the other monitor.

  • How to set a dropdown display value

    I know how to access the current value of a dropdown box. But how can I set it?
    I have a dropdown box and one of the choices is 'Other'. When 'Other' is selected, a text box is enabled so the user can describe what they mean by 'Other'. Now, I want to make the dropdown more robust where if after selecting 'Other' and providing a comment the user willingly or not makes a different selection, the user is warned that the 'Other' description will be deleted with a choice to proceed or not. If the user proceeds the description is deleted and the text box disabled; if the user doesn't want to proceed with the deletion the text box is left enabled with its value untouched and the dropdown value is reset to 'Other'. This is the part that I can't figure out: how do I reset the display value of the dropdown?
    Thanks for the help!
    Marc

    Ok, thanks Malcolm. Yes, you were correct about using the rawValue property to reset the selected value of the dropdown.
    Why I got so confused is because all my scripting, including trying to reset the newly selected value, was done in the Change event of the dropdown. The rawValue property 'appears' to behave differently here I think because of the order of the events, where it holds the original value through the whole selection process. So essentially, the rawValue during the Change event doesn't hold the newly selected value and will not hold it until the Change event is fully completed.
    So I was able to reset the selected value through the Exit event by using a form variable whose value I set in the Change event. So my Change event uses this line at the right location in my script:
    cancelDDSelection.value = "yes";
    and my Exit event uses the following;
    if (cancelDDSelection.value == "yes") //if the Change event reset this form variable to 'yes'
    this.rawValue = "Other"; //reset the selected value to 'Other'
    cancelDDSelection.value = "no"; //reset the form variable to its default value
    Not sure if there's a better to do this, but all works as I wanted it to now.
    Marc

  • How to modify cancelation fees of participent  while executing LSO_PSV1

    Dear All,
    Please let me know the solution for the following problem.
    Scenario is :
    Would like to modify cancellation fees of the participant at runtime while executing LSO_PSV1. In requirement, procedure of calculating cancellation fees is different than standard one, hence need to calculate cancellation fees at runtime as per requirement by client.
    I tried to find out the BADi's/ user exits/ customer exists.
    But dint get the useful one. Could you please help me out.
    Many Thanks in advance,
    ~Prafull

    Thanks for your reply.
    Runtime means while cancellation of fees when popup comes and where we select the reason for the cancellation, it will automatically select the percentage for cancellation, according to this percentage it will calculate cancellation fees. In this popup we need to give customized reasons where cancellation percentages will be different...Hence we need to do calculations when user selects reason. We need the BADi or user exit or enhancement point where we can write our code which will be executed when that popup appears.
    Am i able to clear the doubt. If no, please let me know to elaborate it more.
    Thanks,
    Prafull

  • How to set system time from Terminal while booted from 10.6.3 server install disk?

    I'm installing from a 10.6.3 server install disc onto a Mac Mini.  However, the battery on this Mac Mini is pretty much dead, forcing the system time back to 1/1/2001.  Through some research, this has created a problem in that I cannot move beyond the Welcome screen during setup of OS X server.  It looks like the binary has issues with the system time being older. 
    But I'm stuck in that I don't know how to adjust the system time from the Terminal Utility on the boot CD.  Can anyone help? 

    Hey, i just run in to something similar, tonight while trying to fix a computer.
    The user set the time and date on his computer to 1998 and computer locked everything including time and date in system preferences, and his user account basicly making him from administrator to guest. he could not almost any program properly that required administrator privilages.
    to fix this we used this comand in terminal " sudo date 201703162014 "    todays time and date
    20:17 03/16 2014
    we tryed everything and this fixed in 2 seconds
    ps: when you type sudo in terminal it whil give you a warning the improper use of this command is bad.... click continue.otherwhise you will not be able to execute the command.
    thanks again for this post and have a great day

  • How to set the default display date of Calender prompt of SMPortal???

    Good Day!!
    As for as my knowledge, the default date Visible in all Calender prompt will be the
    Starting Date in the Specified date range either "RelativeDateRange" or "AbosoluteDateRange".
    But we have a requirement to set the default date to a date in the middle of the specified range, I don't find any option to specify in Request Offering Wizard or MP's xml file.
    Our scenario is as follows,
        We are trying to customize the CSPP's request offer "Request Virtual Machine", which has a user promt to select Decommission Date for the New VM. We have configured the date prompt as Relative Date range and set the
    Start date as "1 day next to user's current time" and Maximum date to "90 days after relative date".  So the user will get option to select Decomm date from (1-90) days with the defalut date as 1st day next to his current
    time. But our requirement is to set the default available date as 90th date in the above mentioned Relative Date Range.  
         I couldn't find any option in Request offering Wizard as attached below,
          Also I couldn't even find any tag to specify the default display date in the MP's XML file as attached below. Is there any other <tag> can be included inside <Details> tag to accomplish this ??
        Is there any other way to accomplish this???
        Please advise
    Thanks,
    Narayanababu
    Thanks and Regards, Narayana Babu

    This is probably a link editor parameter, see the linker and loader guide.
    Another thing you can do is write your own sbrk() that will log whenever it's called, so you can at least see how many times it's called and with what values. If you really need in-depth instrumentation, write your own heap routines and give them the same names as the CRTL routines. The linker should find yours first and route all memory operations through them. At least, that's the way it worked for me on SunOS 4.1....

  • How to set a uniform display size of multiple intermedia image types - wher

    I have read "If you want to limit the size of the file that can be uploaded, you can do this as a post generation
    step, by adding the maxFileSize property to the <controller> element in the struts-config:
    This does not address how to limit the *** display size *** where you have multiple intermedia image types - where the original size is not uniform.
    If an image is uploaded where the true image display size is 1024 x 768 - it will display that way in the table/table-form. This will create un-even display size's where previous images sizes where different 384 x 384 and so on.
    Is there a way to encode the display size so that *** ALL *** images regardless of their true size are displayed uniformly at least on one dimension (64 x ???)? This is possible when using products such as Dreamweaver or Flash.
    BTW - JHS/***JDev*** synergy is truely magnificient!!! Way-To-Go Oracle!!!!!!!!!!! Keep it up!!!!
    BG...

    Bill,
    I did some tests, and was able to reproduce it. The problem is that JHeadstart distinguishes between display types fileDownload and image, but UIX uses the same <media> tag to handle both display types. It will look at runtime whether it must render a hyperlink to download the document, or to render it right away as an image.
    To get all images the same size, you can set the display width and height, AND the display type must be set to image.
    However, to get the file name used as download link, you must set the FileName attribute AND the display type must be set to "fileDownload" ..
    So, to solve your problem, it is easiest to set the displayType to "fileDownload" and set the width and height properties post-generation in the generated UIX page.
    In the next release of Jheadstart, we will fix this, and always pick up width, height and fileName settings regardless of the display type.
    Note that you should also set the FileName property against the attribute you are using to upload the file.
    Steven Davelaar,
    JHeadstart Team.

  • Broken iMac display - nothing visible - How to set up external display?

    I have a 17" Core Duo 1.83 with a cracked screen. It boots but I can't see anything thru the cracks. I can access the system in Firewire Target Disk mode, which I used to wipe the HD and reinstall Leopard.
    Is there any way to boot the iMac in Display Mirroring mode, so that I can set it up to use an external display? I have a 22" Dell connected via DVI and would like to use that.
    I guess the ideal would be a keyboard shortcut to use at startup. I've seen on other boards that there is such a shortcut for the Macbook: Command + F4. But it doesn't work with the iMac.
    I also have the Remote Control if that could be any help.
    Would voice commands be an option? If so, how would I activate and use them, given that I can't see anything on the screen? I don't remember ever activating them, so I don't know if they'd be on at the moment.
    My idea is to turn the iMac around with the broken screen facing the wall, then use it with the Dell monitor. Still lots of life left in the iMac with 2GB RAM, works very well with Leopard, still quite fast.
    Any help would be GREATLY appreciated. Thanks.

    Okay, looking good for now!
    I found a thread on Mac Forums. Link: http://www.mac-forums.com/forums/apple-desktops/184101-help-broken-imac-external -screen.html
    Guy explains how he solved problem of iMac with broken screen, connected to external monitor; you need a second Mac to do this.
    I quote:
    -- What u need to do is drag the menu bar from the iMac with broken screen in Sys Prefs/Displays to the Ext Display - which of course is not possible. So if you were to connect the damaged iMac by firewire to another Mac with an External display - start the damaged iMac in Target mode by holding T key after powering on. Then start the Mac with Ext Display and hold Option Key and select the damaged Mac to boot off - once that is going go into Sys Prefs/Displays and drag the menu Bar onto the External Display to make it the Primary one. Then shut it all down and connect the Ext Display to the damaged iMac and with luck you will be GO. --
    I cloned my Macbook 10.5.8 system to the iMac HD and made it bootable. Seemed to be working fine. I then shut down both Macs. I connected an external display to Macbook. The Macbook and iMac were still connected via Firewire. I booted the iMac and pressed T, so it booted in TDM. After about 30 seconds I booted the Macbook and pressed Alt: the Macbook's and iMac's disks were available as boot disks. I chose the iMac's disk and waited.... Seemed a long time. But finally the external monitor came to life and I had the whole thing working, more or less.
    The setup was in Extended Desktop mode, with the extended desktop on my external monitor. Luckily, a bit of the top of the iMac's screen was semi-visible, and I was able to open Display Prefs. I selected Mirrored Displays at first and then was able to work on the external display (and not thru the cracks). From here, I unchecked Mirroring and selected the external display as the main one. This worked just fine. I have a 23" full HD monitor and it looked great.
    I then shut down both computers, disconnected Firewire, disconnected the monitor from the Macbook and connected it to the iMac. Then I rebooted the iMac. It booted up a lot quicker, but on startup it went back to Extended Desktop, with the iMac's display as the Main one. Again, I was able to open Monitor prefs, then clicked on Gather Windows, which put the pref window on the external monitor desktop too. Again, from there, I could make the external monitor the Main one.
    Question: is there any way to make the iMac boot to where the external monitor is the Main desktop all the time and by default?
    If not, maybe the worst case scenario is that I have to set display prefs to Mirrored before shutting down. Then after startup I could just make the external one the main display again.
    Many thanks David.
    P.S. forgot to say that when I set the external monitor as the Main one in display prefs, it all worked okay, except that when I opened System Preferences, the window opened on the iMac's screen, not the external one.
    Is there a setting to make all windows, in all apps, open on the Main display?
    Message was edited by: moonshot61

  • How to set still photo display length

    How can I change the length that a still photos is displayed so I don't have to manually do this for each photo?
    Thanks
    Nik

    Nik,
    This is done in Edit>Preferences>General. IIRC, the still Duration is in Frames, not seconds, so take note of that. Do this, prior to Import. It will also set the Duration for Titles, but they are easy to adjust for Duration.
    Good luck,
    Hunt

  • How to Set Left/right audio channel while Video playback

    how can I controlling the left / right audio channel while video playback, I can't find any method or class for this in JMF, anyone that can direct me how to do it?

    The way I found to control two stereo channel is to implement a plug-in Effect that will control two volumes (left/right) indipandently.
    You can start from the example GainEffect from sun, and implement your control.
    For eample, if you want to mute the left channel, simply set to 0 all the odd samples (or even...I don't remember exactly, try it).
    You have then to add you plug in to the processor chain... again see the examples.
    More complex effects (panning etc) can be done in the same way, but it seems to me that it's quite CPU intensive.
    Bye
    Marco

  • How to set datetime field display format in a jspx page

    hi, jdev 11.1.2.3
    have a field in EO/VO being set to DateTime format, and can see the right display in the Oracle ADF model tester.
    but only displayed in Date format even had been set to "javax.faces.DateTime" for Converter attributes in Property palette for the field.
    what should i do?
    thanks.

    at the first glimpse when i set the Control Hints section there are two choices for FORMAT TYPE: none, and simple date.
    and the FORMAT field is disabled. so, i just skip the FORMAT TYPE(none, simple date) choice.
    in fact after make the choice of simple date for the FORMAT TYPE, then FORMAT can be set to:
    ...dd-MMM-yyyy hh:mm:ss a
    and it works now.
    Puthanampatti, thank you once more!

Maybe you are looking for

  • Variety of periodic JVM crashes (no JNI)

    Hello, I have a J2SE application that runs on a Linux box that is getting a number of various JVM crashes. The program has no JNI and does not use any libraries, it's all just Java. The call stacks are always different, and I don't see any consistenc

  • Sidebar not available in some windows

    The pill button has disappeared in Lion. I could toggle the sidebar off and on with it. Now it is a real pain to get the sidebar to appear when I insert a disc or mount a disc image that opens without it. I would like to be able to set a preference t

  • Navigating movie clips

    Hi. I've basically been copying code from a series of tutorials, and now I've hit a wall because the series doesn't cover this part, and I'm certainly no expert at ActionScript. Basically, I'm trying to handle all the navigation with movieclips inste

  • Problems with link colors

    I am currently using DW8 and I have been using Dreamweaver since DW2 . I am working on a site for an artist, where the thumbnails will be links to the pictures. (Right now I only have it set up fot the client to see if the colors of the paintings are

  • Inserting XML Code

    Hi All, Is it posible to insert XML RSS feed info into a Muse Page? Regards Nathan