JTable+show progress

Hi
I basically have few rows in my JTable,on clicking next button in the screen a progress image (gif) must appear next to first cell in row 1...after few seconds this must chnage to a "tick" gif and the next row first cell must display the progress gif and so on.
I have no idea how to achieve this...I created a renderer but it add the progress gif in all the rows in that column...also no clue how to change it to a "tick" gif.
Kindle help me.
Thanks
apoorva

Hello,
You can have one JPanel which is hidden and has the animated gif (as you wanted) as a JLabel. You could position that panel anywhere you want. Simple logic would be, initially the panel is hidden. When you press the next/previous/last/first button, the first thing you do is show that panel then you run the query. Right after you run that query, you hide that panel again.
This is basic logic:
1) Create JPanel with an Image JLabel denoting the progress bar
2) Hide JPanel
3) When next/prev/first/last button are pressed
3a) Show JPanel
3b) Run Query
3c) Hide JPanel
Thats it!

Similar Messages

  • How do you use the status column to show progress of a step in an OI?

    Hi everyone,
    I was just doing a little browsing and noticed the picture at the top of the http://www.ni.com/teststand/ web page.  It shows a progress bar in the status column of a step being executed.
    I have several applications where this would be a very useful addition.  I use the progress bar at the bottom of the OI and sequence editor regularly, but would very much like to show progress of an individual step in the status column.  It would be particularly useful where you turn the tracing off into a sequence but want to see that progress is being made through the steps within it...
    Anyone know how to do this?  I have been unsuccessful in trying to find examples....
    Cheers,
    Barry

    James,
    I believe your answer to Bazza's question also applies to my situation, but I wasn't sure so I thought I would ask.  I am working on a custom TestStand operator interface in LabVIEW using the UI controls.  I would like it to behave as closely as possible to the old Test Executive.  Specifically, I would like the operator to be able to see the contents of the sequence file, interact with them, and see the execution results all in the same view.  Is that possible?  In other words, can I display and interact with a sequence file (display the sequence steps, run selected steps, loop selected steps, etc.) and display the sequence's execution results (including tracing) in the same SequenceView control or do I have to use 2 of them?
    Thanks,
    Ryan Wright

  • Problem in showing progress image and status message.

    Hi, friends,
    I have file upload program in which when user uploads the file
    i want to show animated progress file
    i.e. ( circle.gif )
    when upload finishes it should display message :
    File < file name > uploaded successfully.
    How do i achieve it ?
    since when i am uploading file , image is displayed but
    due to upload process image is hanged up and did not showing
    animation.
    Kindly solve the above problem.
    i post my some code here.
    ============================
    javascript part is here
    function showProgress()
            document.getElementById('imgprogress').style.display = "";
         document.getElementById('imgprogress').style.visibility="";
        function completedupload()
         document.getElementById('progress').style.display = "";
         document.getElementById('progress').style.visibility="";
    <div id="imgprogress" style="display:none; visibility:hidden;"><img src="images/circle.gif"></div>
                                                      <div id="progress" style="display:none; visibility:hidden;"><%= status %></div>
                                                      <div id="" style="display:none; visibility:hidden; "><img src="images/circle.gif" width="21" height="21"></div>since it is not working good.
    please provide me good solution for this.
    i need exactly following :
    when user gives big file to upload it shows progress as animated image
    and upload process finished up, it should remove image and display status message like " File Upload completed. "

    I know this is an old topic, but I found the solution and thought I'd share it! By default, a JList only has 1 visible row. To allow the number of rows to expand dynamically, throw this in.
    this.imageList.setVisibleRowCount(-1);My code looks like this. It centers each image and centers the text under the image and wraps images horizontally.
        ListCellRenderer renderer = new ImageListCellRenderer();
        this.imageList.setCellRenderer(renderer);
        DefaultListModel listModel = new DefaultListModel();
        this.imageList.setVisibleRowCount(-1);
        this.imageList.setLayoutOrientation(JList.HORIZONTAL_WRAP);
        this.imageList.setModel(listModel);and the renderer
    public class ImageListCellRenderer extends DefaultListCellRenderer { 
      public Component getListCellRendererComponent(JList list, Object value, int
          index, boolean isSelected, boolean hasFocus) {
        JLabel label = (JLabel)super.getListCellRendererComponent(list, value,
            index, isSelected, hasFocus);
        if (value instanceof File) {
          File imageFile = (File)value;
          String path = imageFile.getAbsolutePath();
          Image image = Toolkit.getDefaultToolkit().getImage(path);
          image = image.getScaledInstance(100, 100, Image.SCALE_DEFAULT);
          ImageIcon imageIcon = new ImageIcon(image);
          label.setIcon(imageIcon);
          label.setText(path.substring(path.lastIndexOf(File.separatorChar) + 1));
          label.setVerticalTextPosition(SwingConstants.BOTTOM);
          label.setHorizontalAlignment(SwingConstants.CENTER);
          label.setHorizontalTextPosition(SwingConstants.CENTER);
        else {
          label.setIcon(null);
        return label;
    }I need to work on this to improve performance, but it works!

  • How to show progress bar in miniplayer?

    How to show progress bar in miniplayer? I play a lot of music podcasts and it would be very helpful if anyone could help me bring that feature back.

    i answered here:
    http://forum.java.sun.com/thread.jspa?messageID=9739423&#9739423

  • How to show progress during a long Render call

    My effect computes values from all frames in a layer much like Warp Stabilizer does. I set a flag and do this when necessary in my Render function. The user controls when to analyze by clicking a button in the effect UI.
    It can take from a few seconds to over a minute depending on the layer, so I need to show progress to the user.
    In After Effects I can use the progress bar, and put text in the info panel from within the Render proc; but I'd like to find a better way to show progress.
    Indicidentally, neither of these two thing seem to works in Premiere Pro.
    Warp Stabilizer shows progress to the left of the Analyze button in its effects window, but I can's seem to do this from within Render.
    Any ideas?

    Try the Top Menu or Menu button on the dvd player remote. That usually returns to the start of the dvd.

  • Show progress bar before loading the applet or application

    hi ,
    My application size is large and take some time to load . Now i want that to show progress bar . how can i do this .Please Help me
    sorry for my english.
    Thanks

    Do everything in a seperate thread. Create a progress bar in the main thread, then create a new thread for initializing your app. Once the init is done, hide the progress bar and make your app visible.

  • Show progress bar while executing scp command in linux

    I am being trying to execute scp command throug java frames, I want to know is there any way to show progress when i am copying a file to another system.
    The scp command shows the progress in command prompt can i implement that on the jprogressbar.
    thanx in advance.

    I am being trying to execute scp command throug java frames, I want to know is there any way to show progress when i am copying a file to another system.
    The scp command shows the progress in command prompt can i implement that on the jprogressbar.
    thanx in advance.

  • Firefox Downloads (in classic or new download window) does not show progress or downloads

    I noticed that when I download anyhitng that the download window (classic and new) windows do not show progress anymore, do not show files downloaded, nor give me anything to right-click and go to that folder, in which it was saved. I had it fixed for 1 day, until it started to lose the files the next day.
    I only see the arrow turning green, with no result within the downloadswindow.
    I had done the following:
    1. In the Location bar, type about:config and press Enter.
    o The about:config "This might void your warranty!" warning page may appear. Click I'll be careful, I promise!, to continue to the about:config page.
    2. In the Search field, type browser.download.manager.scanWhenDone.
    3. Double-click on the browser.download.manager.scanWhenDone setting to change its value to false.
    You can set the Boolean pref browser.download.useToolkitUI to true on the about:config page to restore the classic Download Manager window.
    Yet this problem still continues.

    '''Try the Firefox SafeMode''' to see how it works there. <br />
    ''A troubleshooting mode, which disables most Add-ons.'' <br />
    [https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode#w_safe-mode-window_2 Troubleshoot Firefox issues using Firefox SafeMode]
    When in Safe Mode... <br />
    * The status of plug-ins is not affected.
    * Custom preferences are not affected.
    * All extensions are disabled.
    * The default theme is used, without a persona.
    * userChrome.css and userContent.css are ignored.
    * The default toolbar layout is used.
    * The JIT Javascript compiler is disabled.
    * Hardware acceleration is disabled.
    * You can open the Firefox 15.0+ SafeMode by holding the '''Shft''' key when you use the Firefox desktop or Start menu shortcut.
    * Or use the Help menu item, click on '''Restart with Add-ons Disabled...''' while Firefox is running.
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before using the Firefox shortcut (without the Shft key) to open it again.''
    '''''If it is good in the Firefox SafeMode''''', your problem is probably caused by an extension, and you need to figure out which one. <br />
    http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes <br />
    Or it might be caused by Hardware Acceleration.
    ''When you figure out what is causing that, please let us know. It might help other user's who have that problem.''

  • How to show progress bar

    how to show progress bar

    This gets asked about 100 times a day, especially when you get people posting it multiple times - learn to use the search facility, or at least Google. It's really not that hard.
    Type "java progress bar" into Google and hit "I'm feeling lucky" - the answer is there.

  • Make task befor send mail. Use of "Show Progress" and Exception

    Hello,
    Could I handle Send Event of MailItem in a way that Outlook understand it.
    I want to do a long task before sending the mail. The user musn't be block. I wish Outlook display the task when user click on "Show progress" I have two choise actualy:
    - I cancel upload while my task ending.
    - I make a new thread were i do all the process and finally call the mailItem send method
    The first seems to work pretty well. But it need the user wait to the end of the process before send. As it didn't block the user to write read others mail it could be a solution.
    I prefered the second one who don't change the user experience. But i have many problem to do it :
    - How to apeared in "Show progress"
    - Exception raise when i send a (draft)mailItem show in preview pane.
    Thanks.

    That is how Outlook Object Model works. Prior to Outlook 2013, some things would work on secondary threads, but sometimes they would blow up in a really spectacular fashion. So in Outlook 2013 Microsoft made a decision to raise an exception immediately as
    soon as Outlook detects that one of its objects is used on a thread other than the primary Outlook thread.
    This applies to the COM addins only of course since when your code is running inside the outlook.exe process. If you are out-of-proc, all calls will be marshaled to the main Outlook thread anyway, which negates the whole purpose of using multiple threads
    to begin with.
    Only Extended MAPI (C++ or Delphi) can be safely used on a secondary thread. You can also use the
    RDO family of objects in
    Redemption - it wraps Extended MAPI and can be safely used on a secondary thread from any language. See also
    http://www.dimastr.com/redemption/faq.htm#Threads
    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

  • Show Progress During Lengthy Multiple Procedures Executing

    I have a C# winform app that on a button press event will call about 8 different procedures taking close to 10 minutes to perform the full cycle of events.  I see that you can use a Background Worker to display a progressbar and display text above the
    progress bar, but is their a way I can display when each different procedure is entered?  For example, possibly show in a BackgroundWorker Something like this: (maybe customize the message a little bit more but this would get the point across and at least
    show progress)
    Procedure 1 Starting 03/25/2015 10:01:08 p.m....
    Procedure 1 Finished 03/25/2015 10:02:25 p.m...
    Procedure 2 Starting 03/25/2015 10:02:28 p.m...
    Procedure 2 Finished 03/25/2015 10:04:30 p.m...
    Procedure 3 Starting  03/25/2015 10:04:50 p.m...
    Procedure 3 Finished 03/25/2015 10:06:15 p.m...

    This is exactly what the ProgressChanged Event is for:
    https://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker.progresschanged(v=vs.110).aspx
    It would be greatly appreciated if you would mark any helpful entries as helpful and if the entry answers your question, please mark it with the Answer link.

  • Show Progress Bar while only on Page Load.

    Hi Experts,
    I want to show progress bar every time when page loads.
    Progress bar is coming on the page. but it is not going off after page is loaded.
    Below is the code which i added for the Progress bar.
    //written on Header Text of Page
    <script type="text/javascript">
    <!--
    function html_Submit_Progress(pThis){
    $x_Show('AjaxLoading');
    window.setTimeout('$s("AjaxLoading",$x("AjaxLoading").innerHTML)', 100);
    //-->
    </script>
    //written on footer text of Page
    <style> #AjaxLoading{padding:5px;font-size:18px;width:200px;text-align:center;left:20%;top:20%;position:absolute;border:0px solid #666;}
    </style>
    <div id="AjaxLoading" style="display:none;"><br /><img src="#APP_IMAGES#progress_bar.gif" id="wait" /></div>
    //called the function Execute on Page Loads 
    html_Submit_Progress(this);Progress bar is continuously showing on the page after page is loaded.
    I want only to show only page loads.
    Please help me .
    Apex Version : Apex 4.1
    DB Version : 10g
    Regards,
    Jitendra

    Hide the loader element when the page has loaded. Put this in the javascript section
    $(document).ready(function(){ $x_Hide('AjaxLoading'); });Or put it in the page load section
    $x_Hide('AjaxLoading');Or create a dynamic action which fires on page load, select a hide action, and use a jQuery selector to target '#AjaxLoading' as an affected element.

  • How to read file asychronous and show progress bar??

    Hello Everyone,
    I am new here and this is my first post here. I made a desktop application in Adobe flex builder 3. In the application I took the path of a folder and merge all the file present in that folder in a new file. I want to show the progress bar when file merging, because it take some time to merge large number of files. I read and write files synchronously. I made the progress bar but when I called it before the file merging happening nothing happened.
    How can I do this??
    Thanks

    if you are using desktop im going to asume you are using air. if thats the case, im not to sure however on the web what you have to do is update the progress bar with some action.
    you can also consider using the  
    cursorManager.setBusyCursor();
    and when you are done then
    cursorManager.removeBusyCursor();
    let me know how you make out.
    Miguel

  • IMac first shows progress bar on startup and then won't start up at all!

    Hi,
    My iMac's somewhat ill I'm afraid. When I power it up, the Apple gong goes and I see the grey Apple logo appear. Few seconds later an progress bar shows up and it doesn't fill, in a minute it'll just disappears and the spinning thing under the logo appears. I've been waiting for over an hour and still nothing happened. I've tried force-powering it off and boot it up again, but still the same results, this is very very very annoying, especially since I don't know what to do at all about this expect for a complete clean install, but that'll be the last option I want, because all my photo's are on it, etc.
    I've installed, an complete clean install, of Snow Leopard a month or two ago, and yesterday I powered the computer off the regular way.
    Thanks a lot in advance you guys!
    EDIT
    Another weird thing going on: I have my hard drive configured in two partition, one for Windows (sorry, needed to run AutoCad) and one for Mac OS. Now when I start up with the option button I get to see the two partitions and their names. My Mac drive now has got a different name, it's the same name, but with a " 1" behind it.
    When I select the partition on Windows Vista, it now shows these disturbing folders:
    http://i49.tinypic.com/2rxjpd3.jpg
    Message was edited by: RobinZ.

    HI and Welcome to Apple Discussions...
    Boot from your install disc and run Disk Utiity to see if there are errors on the startup disk that need repairing.
    Insert your install disk and Restart, holding down the "C" key until grey Apple appears.
    Go to Installer menu and launch Disk Utility.
    Select your HDD (manufacturer ID) in the left panel.
    Select First Aid in the Main panel.
    *(Check S.M.A.R.T Status of HDD at the bottom of right panel. It should say: Verified)*
    Click Repair Disk on the bottom right.
    If DU reports disk does not need repairs quit DU and restart.
    If DU reports errors Repair again and again until DU reports disk is repaired.
    When you are finished with DU, from the Menu Bar, select Utilities/Startup Manager.
    Select your start up disk and click Restart
    While you have the Disk Utility window open, look at the bottom of the window. Where you see Capacity and Available. *Make sure there is always 10% to 15% free disk space*
    If you cannot boot from your install disc, try booting in Safe Mode
    What is Safe Mode
    *" because all my photo's are on it, etc."*
    If you can get the iMac to boot normally I suggest you back up those photos and any other important data to an external source ASAP in case there's a problem.
    No idea why you are seeing those folders in Windows. Boot from your install disc and see what's going on.
    Carolyn

  • JTable -showing column headers and displaying multi-line strings

    Hi,
    This is two questions really.
    #1 - Does anyone know why my column headers aren't showing in my jtable using the model below?
    #2 - Does anyone know how I can display, mulitple line strings in a jtable? Currently my newline character ('\n') is just being displayed as a character.
    any help very much appreciated,
    Tom
    private class TaskHistoryTableModel extends AbstractTableModel {
    private List taskHistory = new ArrayList();
    public Object getValueAt(int row, int col) {
    if (col == 0) {
    return ((TaskHistoryItem) taskHistory.get(row)).getText();
    } else {
    return ((TaskHistoryItem) taskHistory.get(row)).getDate().getTime();
    public int getRowCount() {
    return taskHistory == null ? 0 : taskHistory.size();
    public int getColumnCount() {
    return 2;
    /** Getter for property taskHistory.
    * @return Value of property taskHistory.
    public List getTaskHistory() {
    return taskHistory;
    /** Setter for property taskHistory.
    * @param taskHistory New value of property taskHistory.
    public void setTaskHistory(List taskHistory) {
    this.taskHistory = taskHistory;
    public String getColumnName (int col) {
    return col == 0 ? "Text" : "Entered At";
    public boolean isCellEditable(int row, int col) {
    return false;
    }

    fixed my own problem - make your mulit-line string into html format e.g.
    this string will appear on two lines in a jtable
    "<html><p>A much more interesting entry</p> <p>on multiple lines</p></html>"

Maybe you are looking for