listener

Network Programming in Java - #4 - Receiving and Sending Data - Server Listener & Client sendTCP Method

Introduction: This tutorial is the fourth in my Java Network Programming using KryoNet series in which we are going to be adding a listener to our server and sending test data over TCP from the client to the server. Previous: In the previous tutorial we created a test client to connect to our test server. TCP vs. UDP: TCP and UDP are both Protocols which transmit data from one point to another through data streams.

Creating a Simple Paint Program in Java

Introduction In this tutorial, a simple Paint program is created, which enables us to draw anything to screen. It's a basic program to understand the logic behind creating a paint program. Here main concept is implementing MouseMotionListener which handles mouse events. Whenever mouse is dragged a mouse event is sent to Java which finds the event listener in the program in order to take any action. We need to implement only mouseDragged() of many functions of MouseMotionListener class to draw to the Panel.