我想构建一个消息传递应用程序,当接收到带有文本框的消息时显示一个通知,以便使用Java在通知内进行回复
我是GTK库的noobie,我可以显示通知,但不知道如何使用文本框显示。
我已经在ubuntu中使用apt安装了libjava-gnome-java
这是我尝试显示通知的示例代码。
import org.gnome.gtk.Gtk;
import org.gnome.notify.Notification;
import org.gnome.notify.Notify;
public class Main {
public static void main(String[] args) {
Gtk.init(args);
Notify.init("My program name");
Notification myNotification = new Notification("My notification title","My notification body","dialog-information");
myNotification.show();
}
}
预先感谢