A feature-rich, multi-tab Java text editor with rich text formatting capabilities, pixelated themes, and modern UI components built using Swing.
- Tabbed Document Management: Work with multiple documents simultaneously in separate tabs
- New Tab Creation: Press
Ctrl+Nto create new untitled tabs instantly - Tab Switching: Click on tabs or use keyboard shortcuts to switch between documents
- Unsaved Changes Detection: Smart detection of modified documents with confirmation dialogs when closing unsaved tabs
- Individual Document State: Each tab maintains its own formatting, undo/redo history, and document properties
- Advanced Text Styling: Full rich text support with JTextPane for sophisticated document formatting
- Interactive Formatting Popup: Right-click on selected text to access formatting options
- Text Formatting Options:
- Bold, Italic, Underline: Standard text styling options
- Font Family Selection: Choose from Consolas, Arial, Times New Roman, Courier New, Verdana, Tahoma
- Font Size Control: Adjustable font sizes from 8pt to 32pt
- Text Color: Full color picker for text color customization
- Text Highlighting: Background color highlighting with color picker
- Context-Sensitive Formatting: Formatting popup appears when text is selected via right-click or keyboard shortcuts
- Multiple Visual Themes: 7 unique pixelated themes for retro aesthetics
- Normal (Default): Clean, modern interface
- Dark Retro: Classic dark theme with retro pixelated fonts
- Neon Synthwave: Vibrant neon colors with synthwave aesthetics
- Forest Pixel: Nature-inspired green theme
- Ocean Wave: Calming blue ocean theme
- Sunset Arcade: Warm sunset colors with arcade vibes
- Matrix Hacker: Green-on-black matrix-style theme
- Complete UI Theming: Themes apply to all components including menus, buttons, text areas, and popups
- Pixelated Fonts: Authentic retro fonts for non-normal themes
- Dynamic Theme Switching: Change themes instantly through the View menu
- Multi-Tab File Handling: Open, save, and manage files across multiple tabs
- File Menu Operations:
- New Document (
Ctrl+N): Create new untitled documents in new tabs - Open Document (
Ctrl+O): Open existing files in new tabs - Save Document (
Ctrl+S): Save current tab's document - Save As (
Ctrl+Shift+S): Save current document with new name/location - Close Tab (
Ctrl+W): Close current tab with unsaved changes confirmation - Exit Application (
Ctrl+Q): Exit with confirmation for unsaved changes
- New Document (
- Smart File Management: Automatic detection of file modifications and appropriate save prompts
- Unlimited Undo/Redo: Full undo/redo support per tab with
Ctrl+Z/Ctrl+Y - Find and Replace (
Ctrl+F): Comprehensive text search and replacement functionality - Text Selection Operations: Cut (
Ctrl+X), Copy (Ctrl+C), Paste (Ctrl+V), Select All (Ctrl+A) - Per-Tab Editing State: Each tab maintains independent undo history and editing state
- Enhanced Menu Bar: Complete menu system with File, Edit, View, and Help menus
- Icon-Rich Toolbar: Visual toolbar with emoji icons and tooltips for quick access
- Status Bar: Real-time display of document information and cursor position
- Themed Dialogs: All dialogs match the selected pixelated theme
- Modern Layout: Professional BorderLayout with integrated components
- MVC Pattern: Clean separation between UI, controllers, and document models
- TabManager System: Sophisticated multi-tab management with individual DocumentManagers
- DocumentManager Per Tab: Each tab has its own document state, formatting, and undo history
- FormattingPopup Per Tab: Individual formatting popups for each tab's text content
- Theme Integration: Comprehensive theming system affecting all UI components
- Controller Integration: FileController and EditController work seamlessly with multi-tab interface
Ctrl+N- New Document (creates new tab)Ctrl+O- Open DocumentCtrl+S- Save DocumentCtrl+Shift+S- Save AsCtrl+W- Close Current TabCtrl+Q- Exit Application
Ctrl+Z- UndoCtrl+Y- RedoCtrl+F- Find and ReplaceCtrl+X- CutCtrl+C- CopyCtrl+V- PasteCtrl+A- Select All
- Right-click on selected text - Open formatting popup
- Double-click word selection - Quick word selection for formatting
- Java 21 LTS or higher
- Maven 3.6 or higher
- Operating System: Windows, macOS, or Linux with GUI support
-
Clone the repository:
git clone <repository-url> cd text_editor
-
Build the project:
mvn clean compile
-
Run the application:
mvn exec:java -Dexec.mainClass="com.texteditor.Main" -
Create executable JAR (optional):
mvn clean package java -jar target/text-editor-1.0-SNAPSHOT.jar
src/
βββ main/
β βββ java/
β βββ com/
β βββ texteditor/
β βββ Main.java # Application entry point
β βββ controller/
β β βββ FileController.java # Multi-tab file operations
β β βββ EditController.java # Text editing operations
β βββ model/
β β βββ DocumentManager.java # Document state management
β βββ ui/
β βββ MainWindow.java # Main application window
β βββ MenuBar.java # Complete menu system
β βββ ToolBar.java # Icon toolbar
β βββ StatusBar.java # Status information
β βββ TabManager.java # Multi-tab management
β βββ FormattingPopup.java # Rich text formatting
β βββ themes/
β βββ ThemeManager.java # Theme management system
β βββ PixelatedTheme.java # Base theme class
β βββ NormalTheme.java # Default theme
β βββ DarkRetroTheme.java # Dark pixelated theme
β βββ NeonSynthwaveTheme.java # Neon synthwave theme
β βββ ForestPixelTheme.java # Forest theme
β βββ OceanWaveTheme.java # Ocean theme
β βββ SunsetArcadeTheme.java # Sunset theme
β βββ MatrixHackerTheme.java # Matrix theme
β βββ ThemedDialogs.java # Themed dialog utilities
βββ test/
βββ java/
βββ com/
βββ texteditor/
βββ MainTest.java # Unit tests
- Launch the application
- Use
Ctrl+Nto create a new document tab - Start typing in the rich text editor
- Select text and right-click to access formatting options
- Create new tabs with
Ctrl+N - Switch between tabs by clicking on tab headers
- Each tab maintains independent document state
- Close tabs with
Ctrl+W(with unsaved changes confirmation)
- Select text you want to format
- Right-click to open the formatting popup
- Choose from bold, italic, underline, font family, size, colors
- Formatting is applied immediately to selected text
- Go to View menu β Themes
- Choose from 7 available pixelated themes
- Theme applies instantly to entire interface
- Save documents with
Ctrl+S - Open existing files with
Ctrl+O(opens in new tab) - Use "Save As" for creating copies or renaming
- Architecture: MVC (Model-View-Controller) pattern with multi-tab support
- Rich Text Engine: JTextPane with StyledDocument for advanced formatting
- Theme System: Comprehensive theming affecting all UI components
- Tab Management: Professional tab interface with individual document states
- Memory Management: Efficient handling of multiple documents and formatting states
This project is open source and available under the MIT License.
