Stausbar and progressbar

how to bind the message or status in
progressbar and statusbar while running
or calling stored procedure .
can any one may help,
thanks
pullareddy janapana
null

Excerpt from from code book "Java Thread Programming" which you can adjust to your situation:
public class Notify {
private Object proceedLock;
private boolean okToProceed;
public Notify() {
proceedLock = new Object();
okToProceed = false;
public void waitToProceed() throws InterruptedException {
synchronized(proceedLock) {
while(okToProceed == false) {
proceedLock.wait();
public void proceed() {  //call when the first thread finished its work
synchronized(proceedLock) {
okToProceed = true;
proceedLock.notifyAll();
Also note, that I wrote you better solution for first time :updating of JProgressBar (as all swing comp.) should be done in event dispatching thread. When you use SwingUtilities.invoke() and invokeLater(), thread (i.e. event dispatching thread) is placed into queue thus waiting for previous task to be finished.
Please read about it in
http://java.sun.com/docs/books/tutorial/uiswing/overview/threads.html
It is very important concept about multithreading and swing gui.

Similar Messages

  • Drag drop and ProgressBar cancel button

    Hi,
    I have a class that extends CDragDropTargetFlavorHelper, during ProcessDragDropCommand I want to show a ProgressBar (the code that does this is actually in another, model only, plugin - might be significant), however, though the progress bar shows the cancel button doesn't.  Unless I delay the processing until after the drop is complete by scheduling the command - if I either process the command or schedule and process scheduled commands the cancel button doesn't show.
    Scheduling the command gives a bit of a delay to the user (even with highest priority) and also no ability to feedback 'drop failed'.  So I'd like to:
    - preferably get the cancel button to show without scheduling the command
    - know immediately when a drop has been completed and process scheduled commands.
    Thanks in advance
    Ian

    Thanks Ned,
    I have since been continuing to research this and it would seem that implementing the HitTest could be the way to go. If anyone has any experience or advice to support this I would be grateful.
    Regards
    Chris

  • Problem with fixing pagerdeluxe and progressbar while using jsf-ibm.jar

    hi,
    I am having a jsf data table with <hx:pagerdeluxe> to navigate, and i am using (jsf-ibm-unknown-vers.jar) jar, this works fine. I need to insert a progress bar in my jsf and used <hx:progressBar> but this was not available in the old jar, So i upgraded my jar to jsf-ibm.jar when i ran this progress bar works fine but he pager deluxe shrinks and unable to navigate.. I am using jboss server .... Can any one help me out about regarding this. So that both works fine
    Thanks.
    Rakesh M

    This is not related to Sun JSF. You might have more luck if you ask component library specific questions at the website/forum/mailinglist of the component manfacturer.

  • URLloader and progressbar

    Hi!
    I need to log the bytes which are sent by URLloader, to show
    them in a progressbar, or simply to check the time it will take.
    I know that is possible to get the bytes received by
    URLloader, but I don't mind it; I need to log the sent bytes,
    because I'm sending long forms by URLloader, and I don't know how
    to check progress status while SENDING.
    Is it possible? Could it be possible in a future? I really
    need this feature.
    Thanks

    I have tried it, but It only prompts a message when form is
    sent, so I have to wait... 2 minutes before it's shown if I send a
    long form (is a file in a multipart form).
    In addition, It shows the "server answer totalbytes", not the
    SENT bytes.

  • Threads and progressbar

    hello all,
    I am trying to display a window with an indeterminate progress bar while I am searching through files looking for a particular file. The problem is that when I display the window, the outline of it appears, but never fully displays.......what I attempted to do, was make the window implement runnable. Inside of the run method, I set a JProgressbar to indeterminate and set the window to visible. Right before the code that searches for the file, I created a new thread and gave it an instance of my window class, then called the start method of the thread.
    ex
    class window extends JFrame implements runnable{
    JProgressbar bar = new......
    public void run(){
    bar.setIndeterminate(true);
    this.setVisible(true);
    inside of the main class(which itself is a JFrame)
    Thread temp;
    window mywindow = new window()
    temp = new Thread(mywindow);
    temp.start();
    //searching code here
    mywindow.dispose();
    anybody have any suggestions why the window doesn't display???
    Thanks

    Have you tried it without making the Progress window a thread? Just try opening the window and them starting the search. If that fails, try making the search a separate thread. I would avoid making the window a thread. The swing classes have their own threads running in the background. One thing I found that helps keep windows from freezing is when you have to fire a long process resulting from an actionPerformed event you can do this without writing a lot of code:
    //normal
    actionPerformed(ActionEvent e)
       doSomething();
    //allows window to refresh
    actionPerformed(ActionEvent e)
        new Thread() {
           public void run() {
                doSomething();
        }.start();
    }

  • ButtonBar and ProgressBar all in one

    Anybody have any idea how this ButtonBar + ProgressBar type
    of component was created?
    (See the InsuriCorp example, second one down)
    http://www.adobe.com/devnet/flex/articles/fig_pt6_05.html
    It's really great looking but I'm really not sure how they
    went about it.
    What's the best way to approach this? Mabye a Flash skin, or
    a custom effect, or is there a really easy way that I'm just not
    seeing?

    Unfortunately, no.

  • FileChooser And ProgressBar

    Dear visitor:
    thanks for caring my problems:)
    well,i don' t know how to show a FileChooser in the specific mode i want:the save mode and open mode,and when i select a file in a file chooser,how could i add
    an action listener on the "save" button or the "open" button to save or open a file when i click the button.
    the following question is how to link the progress bar to a thread.for example,
    i am connecting a database or loading an image,how to use the progress bar to show
    exactly how much work has been done,for example,how many percents of the picture has been loaded
    thanks for your help!
    zhile:)

    hi zhile!
    well, you don't need to put an actionlistener on the save or open button of your filechooser...
    you just use sample code:
    JFileChooser fileChooser = new JFileChooser();
    int returnVal = fileChooser.showOpenDialog(null);
    if (returnVal == JFileChooser.APPROVE_OPTION) {
    //in case you select a file
    File file = fileChooser.getSelectedFile();
    else
    //selection a file was cancelled
    or didn't i understand you correctly?
    regards,
    majandrah

  • TableViewer and ProgressBar

    I know it is probably not the right place for this request, but I try ;-)
    I'm testing SWT/JFace and I would like to render a progress bar in a cell of a table using TableViewer class (and not only the Table class).
    Any idea?
    Thx

    You're right in that you're wrong to post here. Check out www.eclipse.org and look for the fora there.
    -Mike Schwager

  • IE5 and progressbar

    I use Internet Explorer 5 and weblogic 5.1
              When i call JSP page , the jsp is load complete but the progress-bar of IE5
              is loading the page and it isn´t true, jsp page
              is load.
              May be can somebody explain that.
              Thanks.
              

    Excerpt from from code book "Java Thread Programming" which you can adjust to your situation:
    public class Notify {
    private Object proceedLock;
    private boolean okToProceed;
    public Notify() {
    proceedLock = new Object();
    okToProceed = false;
    public void waitToProceed() throws InterruptedException {
    synchronized(proceedLock) {
    while(okToProceed == false) {
    proceedLock.wait();
    public void proceed() {  //call when the first thread finished its work
    synchronized(proceedLock) {
    okToProceed = true;
    proceedLock.notifyAll();
    Also note, that I wrote you better solution for first time :updating of JProgressBar (as all swing comp.) should be done in event dispatching thread. When you use SwingUtilities.invoke() and invokeLater(), thread (i.e. event dispatching thread) is placed into queue thus waiting for previous task to be finished.
    Please read about it in
    http://java.sun.com/docs/books/tutorial/uiswing/overview/threads.html
    It is very important concept about multithreading and swing gui.

  • Help with component progressBar and Loader

    The progress bar doesn't work if the .swf movie that's being loaded is being loaded into another movie. If the loader is on the main stage it works fine both in testing and on the internet.
    For example, I created a parent movie and a child movie with a loader and progressBar. The child movie works perfectly by itself. If I load the child movie into the parent movie the progressBar doesn't work.
    I'm a designer not a programmer. Is there a fix for this?

    When using the Loader component, the progress-bar needs to be in the parent movie to work.

  • A query related to ProgressBar and its placing inside Container

    Hi ,
    I tried an example with  Flex3 ProgressBar .I am posting the scenario in which it was correct in one case and wrong in another case .
    Please tell me what  is wrong here in the wrong case :
    The Program is related to :
    I have button on click of that i will be loading the Image . There is no Button and its event Listener Mentioned here .
    Correct Approach :
    This works fine as the Image and ProgressBar are in the same Container called HBox
    <mx:HBox>
    <mx:Image id="image" autoload="false"/>
    <mx:ProgressBar id="MYPB" source="{image}"/>
    </mx:HBox>
    Wrong Approach :
    The below isn't working as i placed ProgressBar outside the container called as HBox
    <mx:HBox>
    <mx:Image id="image" autoload="false"/>
    </mx:HBox>
    <mx:ProgressBar id="MYPB" source="{image}"/>
    Please share your ideas as why this behaves this way .

    Hi Kiran.
    I don't think either of the approach is wrong , it no way effected by placing the ProgressBar inside a container or outside the container.
    Run the sample application below. It will load for both approaches.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
    <mx:Script>
            <![CDATA[
                public function loadImage1():void {
                  image1.load('assets/liazon_logo.png');
                public function loadImage2():void {
                  image2.load('assets/liazon_logo.png');
            ]]>
        </mx:Script>
    <mx:HBox>
      <mx:Image id="image1" autoLoad="false"/>
    </mx:HBox>
    <mx:ProgressBar id="MYPB1" source="{image1}"/>
    <mx:Button label="Load Image1" click="loadImage1()"/>
    <mx:HBox>
      <mx:Image id="image2" autoLoad="false"/>
      <mx:ProgressBar id="MYPB2" source="{image2}"/>
    </mx:HBox>
    <mx:Button label="Load Image2" click="loadImage2()"/>
    </mx:Application>
    If this post answers your question or helps, please kindly mark it as such.
    Thanks,
    Bhasker Chari

  • Problem with JPanel and JScrollBar

    I am having a few problems displaying a progress bar, it is called by the program when needed. The problem is the JFrame appears but no panel seems to be added to it and what app is in the background can be seen through it.
    The frame, panel and progressbar are all declared as global variables at the start of the program.
    I have tried using pack() and repaint() but not had any luck and not really sure how to proceed.
    Thanks in advance
    Aaron
       private void setupProgBar(String title)
          //sets up progress Jframe to contain progress bar
          progress.setTitle(title);
          progress.setMinimumSize(new Dimension(300,100));
          progress.setLocationRelativeTo(null);
          progress.setAlwaysOnTop(true);
          progressPanel.setLayout(new GridBagLayout());
          loadMedia.setIndeterminate(true);
          GridBagConstraints c = new GridBagConstraints();
          c.fill = GridBagConstraints.HORIZONTAL;
          c.weighty = 0.5;
          c.gridx = 0;
          c.gridy = 0;
          progressPanel.add(loadMedia, c);
          progress.add(progressPanel);
          progress.setVisible(true);
       }

    It's clearly a concurrency issue. Please go through this tutorial:
    The Java&#8482; Tutorials: [Concurrency in Swing|http://java.sun.com/docs/books/tutorial/uiswing/concurrency/index.html|The best way to learn!]
    db

  • Dzen, conky and wmii statusbar...

    Hi,
    [What I need]
    I'm trying to get a system info statusbar working on my wmii setup.
    [What I've done so far]
    1. Using wmii's statusbar directly is too difficult for me as I don't have enough knowledge about my system to get all the information I need and I a feel *a bit* unconfortable to work with sed and awk.
    2. Then I tried to pipe conky into wmii statusbar but it is not straightforward at all, as the only working way I found, posted on the wmii thread, makes conky write a file and then wmii status bar to continuosly 'cat' that file. This way my hard disk is always active as wmii is always reading conky's output file.
    3. I finally decided not to use wmii's stausbar and "replace" it with conky piped into dzen2. The major problem is that dzen initially displays conky's output correctly but the whole bar disappears as soon as I switch to another workspace.
    Can someone point me to a solution?
    Here's my dzen_conky.sh script:
    #!/bin/bash
    FG='#999999'
    BG='#181818'
    FONT='-xos4-terminus-medium-r-*--12-*-*-*-*-*-iso10646-1'
    conky | dzen2 -ta r -h 12 -y 787 -fg $FG -bg $BG -fn $FONT
    Many thanks!

    rent0n wrote:
    Hi,
    [What I need]
    I'm trying to get a system info statusbar working on my wmii setup.
    [What I've done so far]
    1. Using wmii's statusbar directly is too difficult for me as I don't have enough knowledge about my system to get all the information I need and I a feel *a bit* unconfortable to work with sed and awk.
    2. Then I tried to pipe conky into wmii statusbar but it is not straightforward at all, as the only working way I found, posted on the wmii thread, makes conky write a file and then wmii status bar to continuosly 'cat' that file. This way my hard disk is always active as wmii is always reading conky's output file.
    3. I finally decided not to use wmii's stausbar and "replace" it with conky piped into dzen2. The major problem is that dzen initially displays conky's output correctly but the whole bar disappears as soon as I switch to another workspace.
    Can someone point me to a solution?
    Here's my dzen_conky.sh script:
    #!/bin/bash
    FG='#999999'
    BG='#181818'
    FONT='-xos4-terminus-medium-r-*--12-*-*-*-*-*-iso10646-1'
    conky | dzen2 -ta r -h 12 -y 787 -fg $FG -bg $BG -fn $FONT
    Many thanks!
    hmmm...i think you'll need to add -p at the end of the dzen2 options line..it means persist or something like that.i hope that helps

  • How to include PJC and Java Beans in forms

    I have tried a lot to include java codes in my forms ..So I decide to start with ProgressBarPJC(cause it is tested and provided with demo) but I could not set implementation class of java bean object to
    oracle.forms.demos.ProgressBarPJC it does not accept it but it accept ProgressBar instead of ProgressBarPJC. I don't know why? I have made changes in Forms90_builder_classpath to access f90all.jar and progressbar.jar. I have Progressbar.class and progressbarpjc.classs both but i don't know how to set implementation class to ProgressBarPJC.
    don't you think there is lots of configuration and path setting to use any JPC or Jar in forms? I am totally confused with this integration.
    Please solve this matter
    Thanking you,
    Neeraj

    and even more information samples and step by step instructions are on the Java spotligh on the Forms Upgrade Center : http://otn.oracle.com/formsupgrade

  • Progressbar problem

    Hi, i am using netbeans 6 and have opened a desktop application frame which comes up with a status panel and progressbar.i have set maximum and minimum values in the properties of progressbar and in the code section i hav written.....
    for(int i=progressbar.getMinimum();i<=progressbar.getMaximum;i++)
    progressbar.setValue(i);
    but it doesn't show anything....plz help??

    http://java.sun.com/docs/books/tutorial/uiswing/examples/components/ProgressBarDemoProject/src/components/ProgressBarDemo.java

Maybe you are looking for

  • Latest Possible PagePhaseListener - Jdev 11.1.2.3

    Hello: I have the following Use Case: After the inital JSF page load, I need to programatically press a button on that page.  I attempted to create a PagePhaseListener detecting LifeCycle.PREPARE_RENDER_ID and using isInitialRender() then using UIVie

  • Is my iPod broken?

    I was listening to my iPod when all of a sudden it turned off and it will not turn back on. I've tried charging it and plugging it in my computer but it still won't turn on. Is it broken?

  • Norton Vault disappeared after update to 2014 with Firefox 27.0

    I just checked my Add-ons Manager to discover that NIS 2014 and Firefox v27.0 are not compatible so Norton has been disable. I'm not sure who's responsible for making it compatible but the issue needs to be addressed quickly. I use Firefox as my defa

  • New Output Type

    Hi All,          I have to define new output type for PO Print-out E-mail. Please povide me details,what are the required setting need to be done for triggering the mail (Functional side). Regards Pavan

  • Bug Report: ftpConnection:loggingEnabled

    The statement:      ftpConnection.loggingEnabled = true causes an error (ftpConnection is a valid ftp-connection object)