🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #2454

How do I get an Hourglass cursor?

#2454
From: Robert Piskac
Date: Mon, 04 Dec 2000 00:00
63 lines
2579 bytes
How do I get an hourglass cursor?  I placed the function call 
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)) but no 
hourglass appears.  The InstituteInformation class calls about 20 
database objects and loads them up with data.  This process takes about 
30 seconds. I would like the user to know work is being done in the 
background.
============== menu.class =========================================

  void jButtonInstitutionInformation_actionPerformed(ActionEvent e)
  {
    
if(globalVariables.ReadCiaSetting("InstituteInformationPresent").equalsI
gnoreCase("false"))
      {
        try
        {
          boolean packFrame = false;

          setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));

          InstituteInformation frInstituteInformation = new 
InstituteInformation(globalVariables);
          if (packFrame)
          {
            frInstituteInformation.pack();
          }
          else
          {
            frInstituteInformation.validate();
          }
          //Center the window
          Dimension screenSize = 
Toolkit.getDefaultToolkit().getScreenSize();
          Dimension frameSize = frInstituteInformation.getSize();
          if (frameSize.height > screenSize.height)
          {
            frameSize.height = screenSize.height;
          }
          if (frameSize.width > screenSize.width)
          {
            frameSize.width = screenSize.width;
          }
          if (screenSize.width > 800)
          {
            frInstituteInformation.setLocation(0,0);
          }
          else
          {
            frInstituteInformation.setLocation(0, 0);
          }
          frInstituteInformation.show();
          frInstituteInformation.setSize(screenSize.width, 
screenSize.height-35);
        }
        catch (Exception e2)
        {
        }
      }
  }
Technical Details
Message-ID: <20001204.14351125@waldo.idi-net.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,59989829e80cfb38,start
X-Google-Attributes: gid1089d0,public
From: Robert Piskac <bob@pbsoftware.com>
Subject: How do I get an Hourglass cursor?
Date: 2000/12/04
Message-ID: <20001204.14351125@waldo.idi-net.com>
X-Deja-AN: 700959400
Content-Transfer-Encoding: quoted-printable
Organization: Another Netscape Collabra Server User
X-Priority: 3 (Normal)
Content-Type: text/plain; charset=ISO-8859-1
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.api