Posts

Showing posts from January, 2017

Exercise Intermediate, part 4: Chat application - Complete chat

Image
This part is a continuation of Exercise Intermediate, part 3: Chat application - Register and Login so before starting this part of the exercise make sure to have completed the part 3 first. At part 3 we managed to open an empty chat window. In this part we will work with that window in order to add the chat functionality there. We should start by creating the graphical user interface. In order to do so we need to change the view of chat window as shown in the figure 1. Figure 1: Organize GUI of chat window After adding the graphical elements on the chat window as shown in figure 1, we need to remove the default items from the list where we will show the users. In order to be able to do so, we need to click on the list and at the properties panel, at the model attribute, we need to click the button with 3 dots as shown in the figure 2. Figure 2: Open list model At the window that pops up shown in figure 3, we need to remove all the elements and than press OK. Figure 3: Clea

Exercise Intermediate, part 3: Chat application - Register and Login

Image
This part is a continuation of Exercise Intermediate, part 2: Chat application - Complete DatabaseInteraction so before starting this part of the exercise make sure to have completed the part 2 first. First let's create the Login form. In order to do so, we need to follow the same steps as we do to create when creating a normal class, except of choosing Java Class... we need to choose JFrame Form... as shown in the figure 1. Figure 1: Create JFrame Form for the Login After we follow the steps shown above we need to give a name to the JFrame Form as shown in the figure 2. Figure 2: Give Login name to the JFrame Form After we create the Login form we need to create its layout. We need to add 3 labels, 1 for the username, 1 for password and 1 to display the errors. We need also 1 text field and one password field in order to get input from the user and in the end we need to add the login button as shown in the figure 3. Figure 3: Create the layout of the login form In or