diff --git a/pom.xml b/pom.xml index e357671..5e39d93 100644 --- a/pom.xml +++ b/pom.xml @@ -29,6 +29,12 @@ + + + src/main/resources + true + + org.apache.maven.plugins diff --git a/src/main/java/net/themusicinnoise/vaccalc/VacCalc.java b/src/main/java/net/themusicinnoise/vaccalc/VacCalc.java index eeae96a..2e2415d 100644 --- a/src/main/java/net/themusicinnoise/vaccalc/VacCalc.java +++ b/src/main/java/net/themusicinnoise/vaccalc/VacCalc.java @@ -3,7 +3,10 @@ package net.themusicinnoise.vaccalc; import javax.swing.*; import java.awt.*; import java.awt.event.*; +import java.io.BufferedReader; +import java.io.InputStreamReader; import java.time.YearMonth; +import java.util.stream.Collectors; public class VacCalc extends JFrame { private CalendarPanel calendarPanel; @@ -48,6 +51,20 @@ public class VacCalc extends JFrame { }); appMenu.add(exitItem); menuBar.add(appMenu); + JMenu helpMenu = new JMenu("Help"); + JMenuItem aboutItem = new JMenuItem("About"); + aboutItem.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent ev) { + BufferedReader br = new BufferedReader(new InputStreamReader(getClass().getClassLoader().getResourceAsStream("about.html"))); + String aboutText = br.lines().collect(Collectors.joining()); + JOptionPane.showMessageDialog(VacCalc.this, + aboutText, + "About", JOptionPane.INFORMATION_MESSAGE); + } + }); + helpMenu.add(aboutItem); + menuBar.add(helpMenu); setJMenuBar(menuBar); pointEngine = new PointEngine(); diff --git a/src/main/resources/about.html b/src/main/resources/about.html new file mode 100644 index 0000000..a0f21bd --- /dev/null +++ b/src/main/resources/about.html @@ -0,0 +1,7 @@ + +

VacCalc v1.0.0

+
+

Copyright © 2026 Nicolás A. Ortega Froysa <nicolas@ortegas.org>

+

License: Zlib

+

Home page: https://code.ortegas.org/nortega/vaccalc

+