A clean and intuitive Java Swing desktop unit converter for volume, length, and temperature conversion, featuring real-time calculations and a simple GUI. It supports common measurement units in a lightweight Java Swing desktop interface.
Java Unit Converter is a lightweight desktop tool built with pure Java Swing that allows users to convert between common units instantly.
It focuses on clarity, correctness, and ease of use, without external dependencies.
β Real-time bidirectional conversion
β Simple tab-based UI
β Custom typography using open-source fonts
β No libraries, no frameworks β just Java
Convert between 13 volume units:
- Gallons, Quarts, Pints
- U.S. Cups, Tablespoons, Teaspoons
- Cubic Inches, Feet, Yards
- Liters, Milliliters
- Cubic Meters, Cubic Centimeters
Convert between 8 length units:
- Miles, Yards, Feet, Inches
- Meters, Kilometers, Centimeters
- Nautical Miles
Convert between 3 temperature scales:
- Fahrenheit
- Celsius
- Kelvin
-
Select a conversion category
Choose Volume, Length, or Temperature using tabs. -
Generate a conversion box
- Select a source unit
- Select a target unit
- Click Generate Conversion
Identical unit selections are blocked with a clear error message.
-
Convert in real time
- Enter a value in either field
- The converted value updates instantly
- Supports decimals and negatives
(-alone is treated as-1for convenience)
- Java Development Kit (JDK) 8+
- No external dependencies
Java-unit-converter/
βββ App.java
βββ fonts/
β βββ NotoSans-Regular.ttf
β βββ NotoSans-Bold.ttf
β βββ EBGaramond-Regular.ttf
βββ font_licenses/
βββ OFL-Noto_Sans.txt
βββ OFL-EB_Garamond.txt
javac *.java
java AppFonts not loading?
- Ensure
fonts/exists and filenames match those inApp.java - Check file read permissions (especially on Linux/macOS)
Classpath errors?
javac -cp . *.java
java -cp . AppUI looks incorrect?
- Check console logs for font loading errors
- Verify font paths are correct
This project uses fonts licensed under the SIL Open Font License (OFL).
- Author: Georg Duffner
- Source: https://github.com/octaviopardo/EBGaramond12
- License:
font_licenses/OFL-EB_Garamond.txt
- Author: Google Inc.
- Source: https://github.com/notofonts/latin-greek-cyrillic
- License:
font_licenses/OFL-Noto_Sans.txt
This project complies with Apache License 2.0 and SIL OFL by:
- Including unmodified font files
- Bundling full license texts
- Preserving copyright notices
- Not redistributing fonts independently
- Providing clear attribution
Contributions, bug reports, and suggestions are welcome.
If you find this project useful, please consider starring β the repository β it helps others discover it.
Β© 2025 richie-rich90454





