π Document Analyzer β Java Swing Application
Website Link
https://krishna-432.github.io/FILE-SIZE-CALCULATOR-FOR-DOCUMENTS/
πΉ Project Overview
The Document Analyzer is a Java-based desktop application that allows users to upload a document (such as .txt
or .pdf
) and quickly calculate important statistics. It is beginner-friendly and demonstrates the practical use of Java Swing for GUI and Java File I/O for analyzing documents.
The application automatically provides:
- File Size (KB/MB)
- Word Count
- Character Count
- Longest Word
- Average Word Length
β¨ Key Features
- π File Selection: Upload
.txt
or .pdf
files from your system.
- π Word & Character Count: Automatically counts words and characters.
- π File Size Calculation: Displays actual file size in KB or MB.
- π Basic Statistics: Shows longest word and average word length.
- π₯οΈ Simple GUI: Intuitive interface built using Java Swing.
π Technologies Used
- Java SE 8+
- Java Swing for GUI
- File I/O for reading files
- Optional: Apache PDFBox (for PDF support)
π How to Use
- Run the application by executing
Main.java
or the JAR file.
- Click Upload File to select your
.txt
or .pdf
document.
- The application displays:
- File name
- File size
- Word count
- Character count
- Longest word
- Average word length
π Project Structure

πΉ Sample Workflow
Open Document Analyzer
Click βUpload Fileβ
Choose your PDF document
View the statistics in the GUI
π‘ Future Enhancements
- Support for
.docx
and other file formats.
- Export results to CSV, PDF, or Excel.
- Real-time analysis while typing in the GUI.
- GUI theme customization (dark/light mode).
π€ Author
Krishna Madar
πΈ Screenshots
Initial page appear to user

Final page to Showcasing datails about updated PDF file details
