A Java-based application for creating and managing 2D floor plans with a modern user interface using FlatLaf.
- Modern, user-friendly interface with FlatLaf theme
- Secure login system
- Interactive room creation and management
- Drag-and-drop room positioning
- Room type selection (Bedroom, Kitchen, Living Room, etc.)
- Room rotation and modification
- Save and load floor plans
- Grid-based layout for precise positioning
- Collision detection between rooms
- Java Development Kit (JDK) 17 or higher
- Apache Maven
- Git (optional, for cloning the repository)
-
Install Java JDK 17 or higher:
- Download OpenJDK from Adoptium
- Run the installer
- Verify installation:
java -version
-
Install Maven:
- Download Apache Maven
- Extract to a directory (e.g.,
C:\Program Files\Apache\maven
) - Add to System Environment Variables:
- Add
M2_HOME
:C:\Program Files\Apache\maven
- Add to PATH:
%M2_HOME%\bin
- Add
- Verify installation:
mvn -version
-
Clone or download the project:
git clone https://github.com/anshull-saxena/2D_Floor_Planner.git cd 2D_Floor_Planner
-
Install Java JDK 17 or higher:
# Using Homebrew brew install openjdk@17 # Verify installation java -version
-
Install Maven:
# Using Homebrew brew install maven # Verify installation mvn -version
-
Clone or download the project:
git clone https://github.com/anshull-saxena/2D_Floor_Planner.git cd 2D_Floor_Planner
-
Install Java JDK 17:
# Update package list sudo apt update # Install OpenJDK 17 sudo apt install openjdk-17-jdk # Verify installation java -version
-
Install Maven:
# Install Maven sudo apt install maven # Verify installation mvn -version
-
Clone or download the project:
git clone https://github.com/anshull-saxena/2D_Floor_Planner.git cd 2D_Floor_Planner
-
Install Java JDK 17:
# Install OpenJDK 17 sudo dnf install java-17-openjdk-devel # Verify installation java -version
-
Install Maven:
# Install Maven sudo dnf install maven # Verify installation mvn -version
-
Clone or download the project:
git clone https://github.com/anshull-saxena/2D_Floor_Planner.git cd 2D_Floor_Planner
After installation, build the project:
# Windows (Command Prompt)
mvn clean install
# macOS/Linux (Terminal)
mvn clean install
-
Start the application:
# Windows/macOS/Linux mvn exec:java
-
Login credentials:
- Username: admin
- Password: admin
-
Login:
- Launch the application
- Enter your credentials
- Click "Login" or press Enter
-
Creating Rooms:
- Select room type from the "Room Type" button
- Set dimensions using "Set Dimension"
- Set position using "Set Position"
- Click "Add Room" to place the room
-
Modifying Rooms:
- Click on a room to select it
- Use "Properties" to view room details
- Use "Modify" to:
- Rotate the room
- Remove the room
- Drag rooms to reposition them
-
Saving/Loading:
- Click "Download" to save your floor plan
- Click "Open File" to load an existing plan
- Files are saved in .2ds format
-
Additional Features:
- Grid system for precise alignment
- Automatic door placement between adjacent rooms
- Collision detection prevents room overlap
Login.java
: Handles user authenticationRoomPlan2.java
: Main application logic and UIpom.xml
: Maven project configuration
To modify the application:
- Import the project into your IDE (Eclipse, IntelliJ IDEA, or VS Code)
- Ensure Maven dependencies are resolved
- Run the main class
Login.java
-
If Java is not recognized:
- Check System Environment Variables
- Add JAVA_HOME to System Variables
- Add %JAVA_HOME%\bin to PATH
-
If Maven is not recognized:
- Verify M2_HOME in System Variables
- Verify %M2_HOME%\bin in PATH
- Restart Command Prompt
-
If Maven is not found:
brew install maven
-
If Java is not found:
brew install openjdk@17
-
If Java is not found:
# Ubuntu/Debian sudo apt install openjdk-17-jdk # Fedora/RHEL sudo dnf install java-17-openjdk-devel
-
If Maven is not found:
# Ubuntu/Debian sudo apt install maven # Fedora/RHEL sudo dnf install maven
-
If dependencies fail to download:
mvn clean install -U
-
If the UI looks incorrect:
- Ensure FlatLaf dependencies are properly included
- Check Java version compatibility
- Try cleaning and rebuilding:
mvn clean mvn compile mvn exec:java
This project is licensed under the MIT License - see the LICENSE file for details.
Feel free to reach out with any questions or feedback regarding the 2D Floor Planner project! [email protected]