A modern JavaFX application for discovering random images from Imgur.
- Random Image Generation - Fetches random images from Imgur's vast collection
- Session History - View all previously fetched images from the current session
- Download Images - Save any image (current or from history) to your computer
- Dark/Light Themes - Toggle between dark and light modes with blue accent buttons
- Zoom Controls - Mouse wheel zoom and sidebar controls (Fit, 1:1, +, -)
- Responsive Layout - Adapts to different window sizes
- Java 17 or higher (latest version recommended)
- Maven 3.6+ (only needed for building from source)
If you just want to run the application:
- Download and install the latest version of Java from Oracle or Adoptium
- Download
random-image-generator-1.0.0.jarfrom the releases - Double-click the JAR file, or run:
java -jar random-image-generator-1.0.0.jar
# Clone the repository
cd Random-Imgur
# Build the project
mvn clean package
# The JAR file will be created in the target directorymvn javafx:runjava -jar target/random-image-generator-1.0.0.jarNote: If you encounter issues running the JAR directly, you may need to use the JavaFX runtime:
java --module-path /path/to/javafx-sdk/lib --add-modules javafx.controls,javafx.fxml,javafx.swing -jar target/random-image-generator-1.0.0.jar
- Generate Random Image - Click the "Generate Random" button to fetch a random image
- View Image - The image is displayed in the center panel
- Download - Click "Download" to save the current image
- History - Previously fetched images appear in the bottom gallery
- View Past Image - Click any thumbnail or the "View" button to view a previous image
- Download from History - Click the "Save" button on any thumbnail to download it
- Clear History - Use the "Clear" button to reset the session history
- Toggle Theme - Click the theme button to switch between dark and light modes
- Zoom - Use the mouse wheel or sidebar buttons to zoom in/out
Random-Imgur/
├── pom.xml # Maven configuration
├── src/
│ └── main/
│ ├── java/
│ │ ├── module-info.java # Java module definition
│ │ └── com/randomimgur/
│ │ ├── Main.java # Application entry point
│ │ ├── Launcher.java # JAR launcher (workaround)
│ │ ├── RandomImgurApp.java # Main UI class
│ │ └── ImageService.java # Image fetching service
│ └── resources/
│ ├── images/ # Application icon
│ └── styles/
│ └── main.css # Dark/Light theme styles
└── README.md
- JavaFX - Modern UI toolkit for Java
- HttpClient - Java 11+ HTTP client for fetching images
- CSS Styling - Custom dark and light themes with blue accents
- Async Operations - Non-blocking image fetching
- Maven Shade Plugin - Creates executable fat JAR
Created by Aryeh Bloom and Jack Seigerman.
MIT License - Feel free to use and modify!