Skip to content

laibaazeem3250-ship-it/java-paint-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

java-paint-app

A fully functional Paint application built from scratch using Java Swing & Graphics2D โ€” inspired by Microsoft Paint. Made with โค๏ธ by Laiba Azeem "Built during the most unexpected uni day ever ๐Ÿ˜„"


๐Ÿ“ธ Screenshots

View Preview
Paint App with Tools Paint App

โœจ Features

Feature Status
Freehand Brush Drawing โœ…
Eraser Tool โœ…
Line Drawing โœ…
Rectangle Drawing โœ…
Oval Drawing โœ…
Color Picker โœ…
Brush Size Slider โœ…
Clear Canvas โœ…
Save Drawing โœ…
Multi-color Support โœ…
Smooth Canvas Rendering โœ…

๐Ÿง  Concepts Applied

Concept How It's Used
enum ToolType Manages tool states cleanly
CanvasPanel extends JPanel Custom drawing canvas
BufferedImage Stores canvas pixel data
Graphics2D Renders all shapes & drawings
MouseListener Detects clicks & drags
MouseAdapter Handles press & release events
JSlider Controls brush size dynamically
JComboBox Color selection dropdown
OOP Inheritance CanvasPanel extends JPanel

๐ŸŽฎ How to Use

Tool Action
๐Ÿ–Œ๏ธ Brush Click & drag to draw freely
๐Ÿงน Eraser Click & drag to erase
๐Ÿ“ Line Click & drag for straight lines
โฌœ Rectangle Click & drag to draw rectangles
โญ• Oval Click & drag to draw ovals
๐ŸŽจ Color Pick any color from dropdown
๐Ÿ“ Size Drag slider to change brush size
๐Ÿ—‘๏ธ Clear Wipes entire canvas clean
๐Ÿ’พ Save Saves your drawing as image

๐Ÿ’ก App Architecture

PaintApp (JFrame) โ”œโ”€โ”€ Toolbar (JPanel) โ”‚ โ”œโ”€โ”€ Brush Button โ”‚ โ”œโ”€โ”€ Eraser Button โ”‚ โ”œโ”€โ”€ Line Button โ”‚ โ”œโ”€โ”€ Rectangle Button โ”‚ โ”œโ”€โ”€ Oval Button โ”‚ โ”œโ”€โ”€ Color Picker (JComboBox) โ”‚ โ”œโ”€โ”€ Size Slider (JSlider) โ”‚ โ”œโ”€โ”€ Clear Button โ”‚ โ””โ”€โ”€ Save Button โ””โ”€โ”€ CanvasPanel (JPanel) โ”œโ”€โ”€ BufferedImage (canvas) โ”œโ”€โ”€ Graphics2D (renderer) โ”œโ”€โ”€ MouseListener (input) โ””โ”€โ”€ ToolType enum (state)



๐Ÿš€ How to Run

  1. Make sure JDK 8+ is installed
  2. Clone the repo:
   git clone https://github.com/laibaazeem3250-ship-it/java-paint-app.git
  1. Open in Eclipse IDE
  2. Run PaintApp.java
  3. Start drawing! ๐ŸŽจ

๐Ÿ“… Progress Log

Date What I Built
April 10, 2026 Full Paint App with 5 tools, color picker, size slider & save feature

๐Ÿ› ๏ธ Tech Stack

Java Eclipse Swing Graphics2D


๐Ÿ™‹โ€โ™€๏ธ Author

Laiba Azeem ๐ŸŽ“ CS Student | Building real apps while still learning ๐Ÿ’ช Came to uni on the most uncertain day of the year and still shipped code ๐Ÿ˜„ โ€” dedication level: MAX

GitHub

About

๐ŸŽจ Microsoft Paint? Nah, this is Laiba Paint! Built with Java Swing & Graphics2D from scratch

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages