Friend Javed Akhter,
I understood what you are looking for. Recently so many
websites are uploaded on internet who are using java
applet button. I think you are interested to make that kind of applet
isn't it? Ok. Actually, the way you are thinking it is not
correct. You have to use different button image .gif files giving same width and same height, but different title like
"Welcome" with one image and " Welcome to java's world" with
another image. But when you will make your image you have to
adjust your title alignment, ok.Then you have to think other java code. If you have knowledge about html. It would be
a piece of cake to you. Look at the followings:
You need three image variables like these:
import java.applet.*;
import java.awt.*;
public class button extends applet{
Image currentimage; // declare for temporary image.
Image normalimage; // declare for image one.
Image mouseoverimage; // declare for image two.
public init(){
// here load your image using Mediatracker and initialise your
// two images.
currentimage=normalimage;
// do other try{} block with catch exception
//........
} // end of init()
public boolean Mouseenter(event evt, int x, int y)
{
currentimage=mouseoverimage;
update(getGraphisc(});
return true;
}
public boolean mouseExit(Event evt, int x, int y)
{
currentimage=normalimage;
update(getGraphics());
return true;
}
}
Kindly think deeply and find syntex error and solve your
problem.
Thanks,
Golam Newaz