Online-TicTacToe

Log | Files | Refs | README | LICENSE

commit c5330a81a91b049169727290776426f9bf05311f
parent 61914f0c2ab4dda50bf2e12b75e6c5fea8faf313
Author: William Lindholm <william_lindholm@outlook.com>
Date:   Mon, 11 Nov 2024 13:25:07 +0000

Updated readme with UI, login and registration information

Diffstat:
MREADME.md | 23+++++++++++++++++++++--
Amedia/ErrorLogin.png | 0
2 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md @@ -20,4 +20,23 @@ After running the tictactoe web service, this interface was presented, with all To generate the SOAP interface, a new web service client was created in netbeans using a link to the WSDL file. Thereafter, necessary dependencies were added to allow the project to run; `org.glassfish.metro : webservices-rt : 3.0.3` and `com.sun.xml.ws : jaxws-maven-plugin : 4.0.1`. ![web service client creation](./media/client_interface_creation.png) ![client dependencies](./media/client_dependency_addition.png)<br> -After then building the client project, the files `TicTacToeWS.java` and `TicTacToeWebService.java` were automatically generated, which now allow us to call procedures on the TicTacToeWS. -\ No newline at end of file +After then building the client project, the files `TicTacToeWS.java` and `TicTacToeWebService.java` were automatically generated, which now allow us to call procedures on the TicTacToeWS. + + +## Client +### UI +For the UI, Swing and Flatlaf was used. Flatlaf is an open source library which changes the look and feel of default swing to be more modern. To keep the application simple to use, one frame is created when the application starts, then the content within the frame is replaced with various JPanels, such as: +- StartPanel +- MainPanel +- LoginPanel +- RegisterPanel + +etc. The panels mostly use springLayout, since it easily allows us to position components relative to other components, or the frame/panel they are within, for example, placing something 20px from the top of the frame, and 20px from the left of the frame. + + +## User registration +To register a new user, the registerpanel was modified to include a username, password, name and surname field. And a register button with an actionlistener. When the actionlistener is called, it sends a new SOAP call to the web service containing the previously mentioned information. The UID which is received from the call, is then stored as a public class variable in the client. + +## User Login +For the login, a similar method to the User registration form was used. The only difference here is that if the UID -1 is received from the login, indicating that the user did not supply valid information, an error label is shown. +![Error login](./media/ErrorLogin.png) +\ No newline at end of file diff --git a/media/ErrorLogin.png b/media/ErrorLogin.png Binary files differ.