Results 1 to 6 of 6

Thread: View An Image Type Hourglass In Java

  1. #1
    Join Date
    Nov 2009
    Posts
    712

    View An Image Type Hourglass In Java

    Hello, I am new in java programming and while learning it, I am not able to get the solution for the showing the image type hourglass to inform the process is ongoing. So, if anyone is having knowledge of java programming and jsp then please help me to achieve it. I would be thankful to you. Is it possible to make use of the java-script for this purpose?

  2. #2
    Join Date
    Feb 2008
    Posts
    1,852

    Re: View An Image Type Hourglass In Java

    Hello, I am also working on the similar type of the problem. I am having forms as below in my application.
    - A hidden div containing a message and a small animated gif image of an hourglass that appears to validate the form.
    - One target to another hidden div empty
    - Validation of the form by post on a servlet
    - The form is validated via javascript

    If anyone knows the solution then reply about the same to me also.

  3. #3
    Join Date
    May 2008
    Posts
    2,389

    Re: View An Image Type Hourglass In Java

    Hello, I think if you make use of the code below then you will able to get the solution for your problem:
    Code:
    var one;
    function fun()
    {		
    var url = "<% = oneuest.getContextPath ()%>/ ServletDoGet";
    if (window.XMLHttpRequest) 
    { 	    	
    one = new XMLHttpRequest();
    try 
    {
    one.open("GET", Url, true);
    one.onreadystatechange = Function()
    {
    if (one.readyState == 4)
    {
    processStateChange();
    }
    }
    } 
    catch (e) 
    {
    alert(e);
    }
     one.Send(null);			        
     } 
    else if (window.ActiveXObject) 
    { 
    one = new ActiveXObject("Microsoft.XMLHTTP");
    if (one) 
    {
    one.onreadystatechange = ProcessStateChange;
    one.open("GET", Url, true);
    one.Send();
    }
    }

  4. #4
    Join Date
    Apr 2008
    Posts
    1,948

    Re: View An Image Type Hourglass In Java

    Hello, I think you must need to make use of the reference books below for getting your problem solved:
    • Java Image I/O API Guide
    • Color Space - Programming in Java Advanced Imaging
    • Creating a Buffered Image
    • Programmer's Guide to the JavaTM 2D API JavaTM 2 SDK

  5. #5
    Join Date
    May 2008
    Posts
    2,012

    Re: View An Image Type Hourglass In Java

    Hello, it is quiet a simple thing to do which you want to do. If you want to view an image type hourglass in java then you must need to make use of the code below:
    Code:
    cmp.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
    And after that if you want to move to the regular or default image of the cursor then you just need to make use of the code below:
    Code:
    cmp.setCursor(Cursor.getDefaultCursor());

  6. #6
    Join Date
    Jan 2008
    Posts
    1,521

    Re: View An Image Type Hourglass In Java

    Hello, if you make use of the code below which is a javascript code, then you will able to get solution for your problem:
    Code:
    function wait (response) 
    {
    var testing = null;
    if (window.XMLHttpRequest) 
    {
    testing = new XMLHttpRequest ();
    }
    else if (window.ActiveXObject)
    {
    testing = new ActiveXObject ( "Microsoft.XMLHTTP");
    }
    testing.onreadystatechange = function () 
    {
    finish (testing);
    }
    document.getElementById ( "Waiting"). style.visibility = "visible";
    testing.open ( "GET", response, true);
    testing.send (null); 
    }
    complete function (testing)
    {
    if (testing.readyState == 4) 
    {
    document.getElementById ( "Waiting"). style.visibility = "hidden";
    }
    }

Similar Threads

  1. Implement the return type in java
    By Captain Carrot in forum Software Development
    Replies: 4
    Last Post: 25-03-2010, 01:34 PM
  2. Type Casting in Java
    By Aakarshan.d in forum Software Development
    Replies: 5
    Last Post: 21-01-2010, 02:56 PM
  3. Not able to view .png and .jpg by type
    By Balamohan in forum Operating Systems
    Replies: 5
    Last Post: 22-12-2009, 07:21 PM
  4. How to change an image type
    By troy in forum Windows Software
    Replies: 3
    Last Post: 27-08-2009, 11:54 PM
  5. How is it possible to get the file type in Java?
    By Quattro in forum Software Development
    Replies: 3
    Last Post: 30-07-2009, 11:04 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,906,672.28354 seconds with 16 queries