A professional Java Swing client-server file transfer application with a modern dark-themed UI. Transfer files between machines over TCP sockets with real-time progress tracking, file previews, and transfer history.
- Modern Dark UI with a professional color palette
- Drag & Drop file support - drop files directly onto the window
- File Browser with file info display (name, size, type)
- Configurable Connection - set server host and port
- Transfer Progress Bar with real-time status updates
- Transfer History log with success/failure indicators
- Threaded Transfers - UI stays responsive during file sends
- Modern Dark UI matching the client aesthetic
- File Cards with type icons, size, sender info, and timestamps
- File Preview - view text files and images directly in the app
- Save File Dialog - choose where to save received files
- Configurable Save Directory via the footer button
- Threaded Networking - accepts multiple concurrent connections
- Status Bar with live connection info and file count
- TransferProtocol utility class with shared constants, color theme, file type detection, and formatting utilities
- Enhanced MyFile model with timestamps, sender info, and formatted size display
- Supports files up to 500 MB
# Server
cd Server
javac TransferProtocol.java MyFile.java Server.java
# Client
cd Client
javac TransferProtocol.java Client.javacd Server
java ServerThe server will start listening on port 3039 by default.
cd Client
java ClientThe client connects to localhost:3039 by default. You can change the host and port in the connection panel.
- In the Client, either drag & drop a file onto the drop zone or click Browse Files
- Review the file info card showing name, size, and type
- Click Send File to transfer
- Watch the progress bar and check the transfer history
- On the Server, click any received file card to preview or save it
Client (TCP) -----> Server (TCP listener)
| |
|-- FileInputStream |-- DataInputStream
|-- DataOutputStream |-- File preview/save
|-- Progress UI |-- File list UI
- Java 17 or later
- No external dependencies - pure Java Swing
The application uses a modern Tokyo Night-inspired dark theme:
- Background:
#1E1E2E/#2A2A3C - Accent Blue:
#7AA2F7 - Accent Green:
#9ECE6A - Accent Red:
#F7768E - Text:
#C0CAF5/#A9B1D6