This project is a Java-based application that provides an interactive graphical user interface (GUI) for visualizing and performing operations on various data structures. The application is implemented using JFrame and includes the following data structures:
- 📋 Array
- 🥞 Stack
- 🚶 Queue
- 🔄 Circular Queue
- 🔗 Linked List
- 📋 Array:
- Takes size, index, and a number as inputs.
- Supports the following operations:
- ➕ Insert: Add a number at a specified index.
- ❌ Delete: Remove a number from a specified index.
- 📈 Sort: Sort the array in ascending order.
- 🔍 Search: Find the index of a specified number.
- 👀 Display: View the entire array content.
- 🥞 Stack:
- Takes size as input.
- Supports the following operations:
- ➕ Push: Add a number to the stack.
- ➖ Pop: Remove the top number from the stack.
- 👀 Display: View all elements in the stack.
- 🚶 Queue:
- Takes size as input.
- Supports the following operations:
- ➕ Insert: Add a number to the queue.
- ❌ Delete: Remove a number from the front of the queue.
- 👀 Display: View all elements in the queue.
- 🔄 Circular Queue:
- Takes size as input.
- Supports the following operations:
- ➕ Enqueue: Add a number to the circular queue.
- ➖ Dequeue: Remove a number from the circular queue.
- 👀 Display: View all elements in the circular queue.
- 🔗 Linked List:
- Created upon clicking a button.
- Supports the following operations:
- 🔄 Insert First: Add a node at the beginning.
- ➕ Insert Last: Add a node at the end.
- ❌ Delete First: Remove the first node.
- ➖ Delete Last: Remove the last node.
- 👀 Display: View all nodes in the linked list.
- 🖼️ Interactive JFrame-based GUI for each data structure.
- 🎥 Real-time visual representation of operations.
- Java Development Kit (JDK): Version 8 or later.
- IDE: IntelliJ IDEA, Eclipse, or NetBeans (optional).
-
📥 Clone the Repository:
git clone https://github.com/Rohitswami16/Data-Structure-Visualization-in-JFrame.git cd DataStructureVisualizer
-
🛠️ Compile the Code:
javac -d bin src/**/*.java
-
▶️ Run the Application:java -cp bin Main
- Launch the application and navigate through the GUI.
- Select a data structure from the main menu.
- Perform operations using the provided buttons and fields.
- View the visual representation of each operation in real-time.
DataStructureVisualizer/
├── src/
│ ├── DSAPP/
│ │ ├── Array.java
│ │ ├── Stack.java
│ │ ├── Queue.java
│ │ ├── CircularQueue.java
│ │ ├── LinkedList.java
│ │ ├── DataStructure.java
│ │ ├── ArrayFrame.java
│ │ ├── StackFrame.java
│ │ ├── QueueFrame.java
│ │ ├── CircularQueueFrame.java
│ │ └── LinkedListFrame.java
├── README.md
└── LICENSE
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-name
). - Commit your changes (
git commit -m 'Add feature'
). - Push the branch (
git push origin feature-name
). - Open a pull request.
This project is licensed under the MIT License. See the LICENSE
file for details.
📧 Contact For any questions or issues, please contact:
🔗 LinkedIn: LinkedIn
🐙 GitHub: Rohitswami16