gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-29 06:14:37 32 4
gpt4 key购买 nike

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

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

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

最佳答案

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

The gtk-fortran project aims to offer scientists programming inFortran 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_BINDINGmodule for interoperability between C and Fortran, which is a part ofthe Fortran 2003 standard. It offers interfaces to around 10000 GTKfunctions (GTK, GDK, GdkPixbuf, Cairo, Pango, ATK, GLib, GObject,GIO).

Note that gtk-fortran goes beyond programming GUI: GTK includes thecrossplatform 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 underWindows via MSYS2. It runs also under UNIX systems like BSD, macOS andRaspbian on the Raspberry Pi.

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

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