Files client1.java and server1.java is for a simple chat interface. It imports various packages including Swing and AWT for the user interface, and IO for networking functionality. The program creates a JFrame object and adds various components to it, such as buttons, text fields, and labels, to create a chat interface. When the "PLAY" button is clicked, it calls a method named "caller()" from another class named "Test." When the "Send" button is clicked, it sends the text in the text field to the output stream and displays it in the chat interface. The text is formatted using HTML and added to a JPanel using a BoxLayout.
Files cars.java and work.java are for a simple 2D car racing game using Java Swing. The game window contains a background image, a road image, a user-controlled car, and several opponent cars. The player has to avoid the opponent cars while driving on the road.SignUp.java creates a registration form after filling it and clicking on "Lets'Play" you can play the game
- User can see the online status of the other user.
- User can send text messages.
- User can play a game .
To run this application, follow the steps below:
- Clone the ChatAndChase repository
- Open the project on netbeans.
- Run the
Server1class to start the server. - Run the
Client1class to start the client. - And click on Play button to play the game,
- Fill the SignUp form and after submitting it click on "Lets'Play" button to play the game.
This project requires Java 8 or higher and the following libraries:
javax.swingjava.awtjava.utiljava.textjava.netjava.io