A simple yet powerful drawing application built with pure Java, featuring an intuitive GUI interface for creating and manipulating geometric shapes.
- Shape Creation: Draw various geometric shapes including:
- Circles
- Triangles
- Rectangles
- Squares
- Line segments
- Resize: Dynamically resize any drawn shape
- Move: Drag and reposition shapes on the canvas
- Delete: Remove unwanted shapes from your drawing
- Recolor: Change the color of existing shapes
- Save Drawing: Export your artwork to your computer for later use
- Load Drawing: Import previously saved drawings to continue editing
- File-based Storage: Uses I/O file operations as a lightweight database solution
- Language: Pure Java
- Architecture: Object-Oriented Programming (OOP) principles
- Design Patterns: Implements various design patterns for clean, maintainable code
- Purpose: Handles all business logic, shape calculations, and file operations
- Interface: Java GUI (Swing/AWT)
- Purpose: Provides user-friendly interface for drawing and shape manipulation
- Method: File I/O operations
- Purpose: Serves as a simple database for saving and loading drawing data
- Object-Oriented Design: Utilizes inheritance, encapsulation, and polymorphism
- Design Patterns: Implements industry-standard patterns for robust architecture
- Modular Structure: Clean separation of concerns between GUI, business logic, and data handling
- Java Development Kit (JDK) 8 or higher
- Java Runtime Environment (JRE)
- Clone or download the project files
- Compile the Java source files:
javac *.java - Run the application:
(Replace
java MainClass
MainClasswith your main class name)
- Select the desired shape tool from the toolbar/menu
- Click and drag on the canvas to create the shape
- Release to finalize the shape
- To Move: Select the shape you want to move from the menu and then choose the destination
- To Resize: Select the shape and use resize handles or controls
- To Recolor: Select the shape and choose a new color from the color palette
- To Delete: Select the shape and use the delete button
- Save: press on the save button and choose where you want to save you drawing
- Load: press on load button and search for the draw you want to load from your PC
The application uses a custom file format to store:
- Shape types and properties
- Position coordinates
- Size dimensions
- Color information
- Layer order
mini-paint-app/
├── src/
│ ├── BackEnd/ # Backend logic and operations
│ │ ├── Circle.java # Circle shape implementation
│ │ ├── DrawingEngines.java # Drawing engine logic
│ │ ├── LineSegment.java # Line segment implementation
│ │ ├── Rectangle.java # Rectangle shape implementation
│ │ ├── shapes.java # Base shapes functionality
│ │ ├── Square.java # Square shape implementation
│ │ └── Triangle.java # Triangle shape implementation
│ ├── FrontEnd/ # GUI components and user interface
│ │ ├── MoveShapee.java # Shape movement functionality
│ │ ├── Paint.java # Main paint application logic
│ │ ├── ResizeCircle.java # Circle resizing operations
│ │ ├── ResizeLineSegment.java # Line segment resizing
│ │ ├── ResizeRectangle.java # Rectangle resizing operations
│ │ ├── ResizeSquare.java # Square resizing operations
│ │ └── ResizeTriangle.java # Triangle resizing operations
│ └── Interfaces/ # Interface definitions for OOP design
│ ├── DrawingEngine.java # Core drawing engine interface
│ └── Shape.java # Base shape class/interface
├── screenshots/ # Application screenshots
└── README.md
Caption: The main application window showing the drawing canvas and available tools.
Caption: Save dialog window for exporting drawings to file.
Caption: Load dialog window for importing previously saved drawings.
Caption: Color selection window for changing shape colors.
Caption: Interface showing shape movement functionality.
Caption: Window demonstrating shape resizing controls and options.
Caption: Application window after drawing a shape, showing the canvas with a created shape.
- Additional shape types (ellipses, polygons)
- Layer management system
- Undo/Redo functionality
- Export to standard image formats (PNG, JPEG)
- Advanced color picker with gradients
- Shape grouping and ungrouping
- Grid and snap-to-grid functionality