Add about information.
This commit is contained in:
6
pom.xml
6
pom.xml
@@ -29,6 +29,12 @@
|
|||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
|||||||
@@ -3,7 +3,10 @@ package net.themusicinnoise.vaccalc;
|
|||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
import java.time.YearMonth;
|
import java.time.YearMonth;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
public class VacCalc extends JFrame {
|
public class VacCalc extends JFrame {
|
||||||
private CalendarPanel calendarPanel;
|
private CalendarPanel calendarPanel;
|
||||||
@@ -48,6 +51,20 @@ public class VacCalc extends JFrame {
|
|||||||
});
|
});
|
||||||
appMenu.add(exitItem);
|
appMenu.add(exitItem);
|
||||||
menuBar.add(appMenu);
|
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);
|
setJMenuBar(menuBar);
|
||||||
|
|
||||||
pointEngine = new PointEngine();
|
pointEngine = new PointEngine();
|
||||||
|
|||||||
7
src/main/resources/about.html
Normal file
7
src/main/resources/about.html
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<html>
|
||||||
|
<p><b>VacCalc v1.0.0</b></p>
|
||||||
|
<hr />
|
||||||
|
<p>Copyright © 2026 Nicolás A. Ortega Froysa <nicolas@ortegas.org></p>
|
||||||
|
<p>License: Zlib</p>
|
||||||
|
<p>Home page: <a href="https://code.ortegas.org/nortega/vaccalc" >https://code.ortegas.org/nortega/vaccalc</a></p>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user