简体   繁体   English

Java映像小程序

[英]Java Image Applet

i am new to java programming. 我是Java编程的新手。 i am trying to create a java applet running in HTML page which will chose any image from your computer by browsing through your directories. 我正在尝试创建一个在HTML页面中运行的Java applet,它将通过浏览目录从计算机中选择任何图像。 So far i was able to display an image in the applet by specifying the path of the image in the code itself. 到目前为止,我可以通过在代码本身中指定图像的路径来在applet中显示图像。 I want to make it dynamic in nature.` 我要使其本质上充满活力。

您需要将JFileChooser添加到小程序中,并在选择文件(图像文件)后创建一个新的BufferedImage来显示在小程序中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM