gpt4 book ai didi

java - 在 Java 中打开 WIth 对话框

转载 作者:行者123 更新时间:2023-11-30 09:58:03 25 4
gpt4 key购买 nike

我想知道是否有一种跨平台的方法可以从 Java Swing 应用程序内部模拟 Windows 打开方式对话框。我的应用程序是电子学习包的编辑器,其中一位用户希望能够在应用程序内用他们选择的编辑器打开内容文件,资源通常是 HTML 文件、图像、css、javascript,但可以是任何类型可以在浏览器中运行的内容。谢谢

最佳答案

我认为您可以使用 JDIC(Java 桌面集成组件)做一些事情。

https://jdic.dev.java.net/documentation/Examples.html

查看包 org.jdesktop.jdic.filetypes

https://jdic.dev.java.net/nonav/documentation/javadoc/jdic/org/jdesktop/jdic/filetypes/package-summary.html

Provides classes for associating applications with file types and accessing a registered file type association.

Every desktop allows the user to view files with the associated applications. Usually a desktop comes with a registry that allows the user to associate applications with file types. An association includes information like a MIME type, file extensions, and actions that could be applied to the file type. By accessing the association information, the desktop could invoke the appropriate applications to handle a file, display an URL or send an email.

关于java - 在 Java 中打开 WIth 对话框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1238991/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com