Visual Java Editor is a lightweight Swing-based Java code editor, developed as part of an OOM Mini Project.
- Utilizes RSyntaxTextArea for syntax highlighting and code folding.
- Leverages FlatLaf for a lightweight, modern, and customizable look and feel.
- Provides options for creating, opening, saving, and saving files as new files.
- Integrated file dialogs simplify file operations.
- Allows direct compilation and execution of Java files through the system terminal, supporting Windows, macOS, and Linux terminals.
- Automatically saves code before compiling to avoid data loss.
- Java Development Kit (JDK): Ensure JDK 21 or higher version is installed.
- Maven: Required for dependency management and project builds.
- Clone or download this repository.
- Open the project in IntelliJ IDEA or any other IDE of your choice.
- If Maven dependencies are not downloaded automatically, run the following command:
mvn clean install
- Run the
JavaEditor
main class from the IDE's run configuration. - The application will launch, ready for use.
- Open the Visual Java Editor application.
- Write your Java code in the editor pane.
- Save the file using options in the File menu.
- Compile and execute the program through the Run menu, which launches the system terminal.
- JavaEditor.java: The main class responsible for initializing the application and setting up the user interface.
- ExecutionManager.java: Manages the compilation and execution processes of Java files.
- EditorPane.java: Extends RSyntaxTextArea to deliver syntax highlighting and modern editor functionalities.
- FileManager.java: Handles file operations such as opening, saving, and creating files.
- ThemeManager.java: Configures themes using FlatLaf.
This project uses the following libraries:
- RSyntaxTextArea: Adds syntax highlighting and advanced editor features.
- FlatLaf: Offers a modern look and feel for Swing applications.