good evening ,
I want to develop a Webpage and , Was Stuck With the Image Behaviour that i could not Resolved Can You tell me how can we put a picture in a frame and make it clickable Thanks you in Advance for your replies ,
good evening ,
I want to develop a Webpage and , Was Stuck With the Image Behaviour that i could not Resolved Can You tell me how can we put a picture in a frame and make it clickable Thanks you in Advance for your replies ,
Hello , to put an image in a JFrame just put it in a label First you copy the desired image in the package that you then you go to the properties of the label and icon you select your image then in the mouseClicked event of the label tells you the page that should display after clicking the following example
and to get the little hand when you pose the cursor on the image you go in the event MouseEntered from the same label and you put the codeCode:JFrame j = new Home (); j.setVisible (true);
Code:jLabel1.setCursor (new Cursor (Cursor.HAND_CURSOR));
and then good luck
Hello , Check this Three Html Codes Saved them in Three Different Files
---------------------------------------------------------------Code:<HTML><HEAD><TITLE>frame_map.html</TITLE></HEAD> <FRAMESET COLS = "50%,*"> <FRAME SRC = "frame_map1.html" NAME = "MAP1"> <FRAME SRC = "frame_map2.html" NAME = "MAP2"> </FRAMESET> </HTML>
---------------------------------------------------------------Code:<HTML><HEAD><TITLE>frame_map1.html</TITLE></HEAD> <HR> <IMG SRC="Image/mymap.gif" USEMAP="#shapes"> <MAP NAME = "shapes"> <AREA SHAPE="POLY" COORDS= "32,36 32,188 93,188 65,136 133,124 82,36" TARGET=MAP2 HREF="Image/leftp.gif"> <AREA SHAPE="POLY" COORDS= "93,188 245,188 244,36 82,36 133,124 65,136" TARGET=MAP2 HREF="Image/rightp.gif"> <AREA SHAPE="DEFAULT" TARGET=MAP2 HREF="Image/defp.gif"> </MAP> <P> <HR> </HTML>
Code:<HTML><HEAD><TITLE> frame_map2.html </TITLE></HEAD> <HR> <H1> This is the initial frame </H1> <HR> </HTML>
A clickable image map is one that links to different places depending on where you click on the image. The image is divided into regions whose boundaries may or may not be visible. For example, a map of the United States with state boundaries might contain links to information about each state, and these links are activated when you click within a state boundary.
In order to create a clickable image map you need to:
- Obtain the image you want in GIF or JPEG format and store it in your public_html directory or some sub-directory therein
- Create lists of the coordinates, in pixel values, that define each clickable region in the image
- Create the necessary HTML code to specify the image, the regions in the image that you may click on, and the places (links) that you are sent when you click on them.
Bookmarks