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 ๐"
| View |
Preview |
| Paint App with Tools |
 |
| 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 |
โ
|
| 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 |
| 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 |
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)
- Make sure JDK 8+ is installed
- Clone the repo:
git clone https://github.com/laibaazeem3250-ship-it/java-paint-app.git
- Open in Eclipse IDE
- Run
PaintApp.java
- Start drawing! ๐จ
| Date |
What I Built |
| April 10, 2026 |
Full Paint App with 5 tools, color picker, size slider & save feature |

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
