Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"java.project.referencedLibraries": [
"lib/**/*.jar",
"c:\\Program Files\\Java\\mysql-connector-j-8.0.32\\mysql-connector-j-8.0.32.jar"
]
}
68 changes: 67 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,67 @@
# Project_PBO_A
# OtakuSide Application

OtakuSide is a Java Swing application for managing product data. It provides a user interface to add, edit, and delete product information, as well as calculate total prices and handle transactions.

## Features

The OtakuSide application includes the following features:

1. **Add Product**: Allows the user to add new products by entering the product name, price, and stock quantity.

2. **Edit Product**: Enables the user to edit the details of an existing product, including the name, price, and stock quantity.

3. **Delete Product**: Allows the user to remove a product from the database.

4. **Calculate Total**: Calculates the total price of a selected product based on the quantity entered.

5. **Save Transaction**: Saves the transaction by updating the stock quantity of the selected product and displaying the change amount (if applicable).

6. **Clear**: Resets the input fields to their default values.

7. **Populate Table**: Retrieves product data from the database and populates the table in the user interface.

## Requirements

To run the OtakuSide application on your local machine, make sure you have the following:

- Java SE Development Kit (JDK): Ensure that you have Java SE Development Kit installed on your machine.

- MySQL Connector/J 8.0.32: You need to have the MySQL Connector/J library to establish a connection between the application and the MySQL database.

## Technology Used

The OtakuSide application is built using the following technologies:

- Java: The core programming language used for the application's logic and user interface.

- Java Swing: The Java Swing framework is used for creating the graphical user interface (GUI) components.

- MySQL: The application integrates with a MySQL database to store and retrieve product data.

- MySQL Connector/J: The MySQL Connector/J library provides the JDBC driver for connecting the application to the MySQL database.

## Getting Started

To run the OtakuSide application on your local machine, follow these steps:

1. Ensure that you have Java and MySQL installed on your system.

2. Download or clone the OtakuSide repository to your local machine.

3. Add the `mysql-connector-java-8.0.32.jar` file to your project's dependencies.

4. Open the project in your preferred Java IDE.

5. Compile and run the `App.java` file.

## Contributing

Contributions to the OtakuSide application are welcome. If you find any issues or want to add new features, please submit a pull request or open an issue on the GitHub repository.

## License

The OtakuSide application is released under the [MIT License](https://opensource.org/licenses/MIT). You are free to modify and distribute the code as per the terms of the license.

## About the Author

OtakuSide was created by Muhammad Nabil Shadiq (H071221083).
73 changes: 73 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="OtakuSide" default="default" basedir=".">
<description>Builds, tests, and runs the project OtakuSide.</description>
<import file="nbproject/build-impl.xml"/>
<!--

There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:

-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-jar: called before JAR building
-post-jar: called after JAR building
-post-clean: called after cleaning build products

(Targets beginning with '-' are not intended to be called on their own.)

Example of inserting an obfuscator after compilation could look like this:

<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>

For list of available properties check the imported
nbproject/build-impl.xml file.


Another way to customize the build is by overriding existing main targets.
The targets of interest are:

-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
-init-macrodef-debug: defines macro for class debugging
-init-macrodef-java: defines macro for class execution
-do-jar: JAR building
run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation

An example of overriding the target for project execution could look like this:

<target name="run" depends="OtakuSide-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>

Notice that the overridden target depends on the jar target and not only on
the compile target as the regular run target does. Again, for a list of available
properties which you can use, check the target you are overriding in the
nbproject/build-impl.xml file.

-->
</project>
Empty file.
Empty file.
Binary file added build/classes/app/App$1.class
Binary file not shown.
Binary file added build/classes/app/App$10.class
Binary file not shown.
Binary file added build/classes/app/App$11.class
Binary file not shown.
Binary file added build/classes/app/App$12.class
Binary file not shown.
Binary file added build/classes/app/App$13.class
Binary file not shown.
Binary file added build/classes/app/App$14.class
Binary file not shown.
Binary file added build/classes/app/App$15.class
Binary file not shown.
Binary file added build/classes/app/App$2.class
Binary file not shown.
Binary file added build/classes/app/App$3.class
Binary file not shown.
Binary file added build/classes/app/App$4.class
Binary file not shown.
Binary file added build/classes/app/App$5.class
Binary file not shown.
Binary file added build/classes/app/App$6.class
Binary file not shown.
Binary file added build/classes/app/App$7.class
Binary file not shown.
Binary file added build/classes/app/App$8.class
Binary file not shown.
Binary file added build/classes/app/App$9.class
Binary file not shown.
Binary file added build/classes/app/App.class
Binary file not shown.
Loading