473,326 Members | 2,134 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

how to display image on our applet using browse button

when i am clicking the browse button image not opened in my applet please help me.

// browse button, generate browse event when it clicks
if (e.getSource()==browse)
{
try{
//filedialog open for choosing directory and file name.
FileDialog fd=new FileDialog(f,"Browse..",FileDialog.LOAD);
fd.show();
MediaTracker mt = new MediaTracker(this);
Image my_gif = getImage(fd.getDirectory(),fd.getFile());
mt.addImage(my_gif,1);
mt.waitForAll();
}
catch (Exception e) {}
repaint();
}

public void paint(Graphics g)
{
super.paint( g );
g.drawImage(my_gif,600,180,300,300,p1);

}
Feb 17 '07 #1
0 1917

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Jeff Napier | last post by:
Hi, This works: banner = getImage(GetCodeBase(),"mypicture.jpg") But, I tried variations of: try { url = new URL("http://www.my-other-website.com/mypicture.jpg");
2
by: david | last post by:
Hello all, let's me explains my long problem: I'm doing an intranet with a media part. So im must be able to upload files on a ftp server AND have a record of informations about this file and...
4
by: Don | last post by:
I have a client page that employs hover buttons. They work just fine in IE. But, when using Netscape, they intermittently won't display. When they don't display, all that shows is a gray box the...
3
by: Jordan Gomila | last post by:
Hi, I wish to get the pixels os an image to transform it. There is any posibility to do this with javascript ? I have done with java, but I can't load web images from other http servers,...
8
by: DKM | last post by:
Here are the source code files to a Java applet that utilizes LiveConnect to communicate with Javascript, and the HTML file. The thing works both in IE 6.0 and FireFox 1.4. but with some...
3
by: Meena Desai | last post by:
Hi, In my .aspx page there are some .jpg images. When I browse the page using IE6, it goes into an infinite loop in downloading the image. No image is displayed after that. If I browse .htm page...
6
by: Ben | last post by:
I am trying to write codes in VB.net to display 3 images in series on a Webform with each image being displayed in the same box for 5 seconds. I am trying to use Timer and image button, don't...
9
by: takeiteasy | last post by:
Hello everyone, I've got a question about programming by using Java applet and the question is : Design a web page containing an applet that simply switches from one image to the next with some...
9
by: shapper | last post by:
Hello, Is there a way to make the browse button an image? Thanks, Miguel
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.