java - 如何将 Fortran 代码与 Java GUI 集成?

标签 java user-interface fortran

我有一个 Fortran 程序,它通过文件(*.dat 或其他)接受输入。

我打算制作一个 GUI(可能使用 SWT)来根据用户输入(通过表单:文本框、下拉列表等)构建输入文件。

问题是,我以前从未这样做过。有什么标准的方法可以解决这个问题吗?我很确定很多人都这样做了(基于谷歌搜索),我只是没有看到一个标准的方法。

最佳答案

你可以看看 gtk-fortran: https://github.com/vmagnin/gtk-fortran/wiki

The gtk-fortran project aims to offer scientists programming in Fortran a cross-platform library to build Graphical User Interfaces (GUI), licensed under GNU GPL 3. Gtk-fortran is a partial GTK / Fortran binding 100% written in Fortran, thanks to the ISO_C_BINDING module for interoperability between C and Fortran, which is a part of the Fortran 2003 standard. It offers interfaces to around 10000 GTK functions (GTK, GDK, GdkPixbuf, Cairo, Pango, ATK, GLib, GObject, GIO).

Note that gtk-fortran goes beyond programming GUI: GTK includes the crossplatform GLib library which offers a lot of generic functions (regular expressions, random numbers, hash, strings, input/output...), and gtk-fortran offers also an interface to PLplot.

Although mainly developed under Linux, you can easily use it under Windows via MSYS2. It runs also under UNIX systems like BSD, macOS and Raspbian on the Raspberry Pi.

关于java - 如何将 Fortran 代码与 Java GUI 集成?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5562463/

相关文章:

返回 boolean 值的 Java 10 ifPresentOrElse

java - 打开启动 Swing 界面的首选方法是什么?有什么区别?

wpf - 如何定位所有控件(WPF 样式)

android - 为什么 androidx.preference 库会阻止我的自定义复选框正常显示?

fortran - Fortran 中 maxloc 的类型冲突

recursion - 如何制作在内部使用循环变量的递归嵌套循环?

Fortran:将成员过程传递给外部函数

java - 从不同计算机启动时,6.0.0.CR1 infinispan 服务器集群未形成

java - 同步线程无法正常工作

java - HTML for Java 组件应该如何引用资源?