This repository contains a collection of NetBeans projects. Currently, it features two distinct projects: a basic calculator application (Calc
) and a database connection utility (DB_Connection
). Additionally, an "EAD" (Enterprise Application Development) project is included, which appears to be a hotel management system. A game project is also present, showing an initial attempt at 2D animation.
This repository showcases a range of Java projects created using NetBeans IDE. These projects vary in complexity, from a simple calculator to a more elaborate enterprise application and a rudimentary game.
The Calc
project implements a basic GUI-based calculator using Java AWT.
- Basic arithmetic operations (+, -, *, /)
- Square root calculation
- Calculation history
- Undecorated Frame
- Java AWT
- Java Development Kit (JDK) 15 or later. (Based on Javadoc, project was compiled with JDK 15)
-
Clone the repository:
git clone https://github.com/billodi/NetBeansProjects.git
-
Open the
Calc
project in NetBeans.
- Run the
GUI.calf.java
file. - Use the buttons on the calculator to perform calculations.
- The calculation history can be viewed by pressing the "H" button.
This project provides a utility class for establishing a database connection to a MySQL database.
- Establishes a connection to a MySQL database.
- Provides methods for executing INSERT, UPDATE, and DELETE (IUD) queries.
- Provides a method for executing SELECT queries and retrieving results.
- Java
- JDBC
- MySQL
- MySQL Server installed and running.
- MySQL Connector/J JDBC driver.
-
Add the MySQL Connector/J JDBC driver to the project's classpath in NetBeans.
-
Modify the connection details in
DB_Connection/src/DBMS/dbms.java
to match your database configuration:String url = "jdbc:mysql://localhost:3306/"; String un = "root"; String pw = ""; c = DriverManager.getConnection(url+"DatabaseName"+"?useSSL=false",un,pw);
- Replace
"DatabaseName"
with the name of your database. - Set the username (
un
) and password (pw
) accordingly.
- Replace
-
Import the
DBMS
package into your Java code. -
Use the
dbms.iud()
method to execute INSERT, UPDATE, or DELETE queries:try { DBMS.iud("INSERT INTO your_table (column1, column2) VALUES ('value1', 'value2')"); } catch (Exception e) { e.printStackTrace(); }
-
Use the
dbms.search()
method to execute SELECT queries:try { ResultSet rs = DBMS.search("SELECT * FROM your_table"); while (rs.next()) { // Process the result set System.out.println(rs.getString("column1")); } } catch (Exception e) { e.printStackTrace(); }
The EAD
project is an Enterprise Application Development project that implements a hotel management system.
- User authentication (Login and Registration for Staff)
- Admin Access
- Customer Information Management (Add, Update, Delete, Search)
- Room Booking
- Food Order Management
- Payment Bill Generation
- Java
- Swing (GUI)
- JDBC (Database Connectivity)
- com.toedter.calendar
- org.jdesktop.swingx
- Netbeans IDE (For UI design assistance)
- Jasper Reports
- Java Development Kit (JDK 8 or later)
- MySQL database server
- JasperReports library
- toedter Calendar library
- swingx library
- Ensure that the required libraries (JasperReports, toedter Calendar, and Swingx) are included in the project's classpath within NetBeans.
- Update database connection string in
src/model/DBM.java
:
Class.forName("org.sqlite.JDBC");
c = DriverManager.getConnection("jdbc:sqlite:hms.db");
- Run
PreLogin.java
to set up admin credential. - Run the
Login.java
class to start the application. - Use the GUI to manage customer information, bookings, food orders, and payments.
An early attempt at making a simple 2D game with character animation.
- 2D character animation (idle, run, jump, attack)
- Key press movement (right/left)
- Basic sprite scaling
- Java Swing
- Java Development Kit (JDK)
- An IDE that supports Java Swing projects (like NetBeans or IntelliJ IDEA)
- Open the project in NetBeans or your preferred IDE.
- Run the
GUI.Test1.java
orGUI/testmanual.java
file. - Press the 'h' and 'j' keys for animations. Arrow keys provide movement.
No license specified. All rights reserved by the repository owner.