Skip to content

akankshavm22/Java-Paint-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎨 Java Paint App

A simple yet powerful desktop drawing application built entirely using Java Swing. This project lets users draw, erase, and create basic shapes with customizable colors and brush sizes — a mini version of MS Paint implemented from scratch.

🖌️ Features

Freehand Drawing (Pencil Tool) – Draw smoothly with adjustable brush size
Eraser Tool – Erase parts of the drawing easily
Shape Tools – Draw rectangles, ovals, and straight lines
Color Picker – Choose any color using the system color chooser
Brush Size Control – Change line thickness from 1px up to 20px
Canvas Management – Clear the canvas or resize it dynamically
Save Artwork – Export your drawing as a .png image
Responsive Design – Canvas auto-adjusts when the window is resized
Clean Modern UI – Organized toolbar and control panel layout

🧠 How It Works

The app uses:

  • BufferedImage to store and render the drawing
  • Graphics2D for drawing lines, shapes, and applying brush strokes
  • Mouse events (MouseListener, MouseMotionListener) to track drawing actions
  • Swing components for UI: JPanel, JButton, JToggleButton, JComboBox, JColorChooser, and more

🪄 Tools Overview

ToolDescription
🖊️ PencilDraw freely with the selected color
🧽 EraserErase by drawing with white color
RectangleDraw outlined rectangles
OvalDraw outlined circles/ellipses
📏 LineDraw straight lines between two points

⚙️ Requirements

  • Java 8 or higher
  • JDK installed and added to your system PATH
  • Works on Windows, macOS, and Linux

🚀 How to Run

  1. Clone this repository

     git clone https://github.com/yourusername/java-paint-app.git
    cd java-paint-app
    
  2. Compile the Java file

     javac PaintApp.java 
  3. Run the application

     java PaintApp 

🧩 Future Enhancements (Ideas)

  • 🪣 Fill/Bucket tool
  • 🅰️ Text tool
  • 🌗 Dark mode
  • 🖼️ Image import support
  • 💾 Auto-save functionality

👩‍💻 Author

Akanksha Mane 🎓 B.E. Information Technology

About

A simple yet powerful desktop drawing application built entirely using Java Swing. This project lets users draw, erase, and create basic shapes with customizable colors and brush sizes — a mini version of MS Paint implemented from scratch.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages