Images and Windows


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Images and Windows

  1. #1
    Join Date
    Feb 2004
    Posts
    3

    Images and Windows

    Hi I have these two programs which I would like to put together put I'm having trouble and I was wondering if someone could help me:

    This first program opens a new window when the mouse overs the labels and then closes the window when it mouses out: File Name: Test4.java

    The second program gets an image from a database and displays the image and also draws a circle at specific location on the image . the cordinates are also taken from the database but what i would like to happen is that when the user moves there mouse on the circle that a new window will open and when they leave the circle the window disappears.

    File Name for second Program: Test2.java

    Thanks for any and all help with this one its been wreaking my head
    Attached Files Attached Files

  2. #2
    Join Date
    Feb 2004
    Posts
    808
    you dont actually say what the problem is with the first one..

    the second one doesnt have the necessary support files to run.. is "highCrimeRate" a class? why does it start with a lowercase letter then?

    Mapping.class -> what's that?

    getCoords() method -> what's that?
    The 6th edict:
    "A thing of reference thing can hold either a null thing or a thing to any thing whose thing is assignment compatible with the thing of the thing" - ArchAngel, www.dictionary.com et al.
    JAR tutorial GridBag tutorial Inherited Shapes Inheritance? String.split(); FTP?

  3. #3
    Join Date
    Feb 2004
    Posts
    3
    The mapping class calls the map from the database.

    the getCoords.class gets the co-ordinates off a database based on the county sent to it.

    The problem I having is intrgrating the Test4.java code
    into this code

    public void paintComponent(Graphics g)
    {
    int j = 0;

    /*Position map on GUI*/
    map.paintIcon(this,g,0,0);

    /*Position Spots on map*/
    for (int i = 1; i <= total; i++)
    {
    lon = coordinate[j];
    j++;
    lat = coordinate[j];
    j++;

    Graphics2D g2d = ( Graphics2D ) g;

    // draw 2D ellipse filled with a blue-yellow gradient
    g2d.setColor(Color.red);
    g2d.fill( new Ellipse2D.Double( /*lon*/lon, /*lat*/lat,/*Size*/ 10, 10 ) );

    }
    }

    In this code you see lon and lat these are tkjem from a database but are used to display the dot on the map at various point. What I want is when the user mouses over the dot a new window will appears and when they mouse out it will disappear. I just not able to ingetrate the two bits of code to do that.

    Cheers

  4. #4
    Join Date
    Feb 2004
    Posts
    3
    Its ok I figured it out

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center