Abstract Factory is a creational pattern that provides an interface for creating families of related or dependent objects without specifying their concrete classes. Think of it as a factory of factories — you pick a factory, and all objects you create through it are guaranteed to be compatible with each other.
The Problem: UI Families
You're building a cross-platform UI toolkit. You have Button and Checkbox widgets. Each platform (Windows, macOS, Linux) needs its own look-and-feel. You need to guarantee that if you create a WindowsButton, you also create a WindowsCheckbox — never a mixed family like WindowsButton + MacCheckbox.
Participants
Full Code Example
Abstract Factory vs Factory Method
Abstract Factory in Java Standard Library