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
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.
Bookmarks