Search This Blog

Showing posts with label java program. Show all posts
Showing posts with label java program. Show all posts

Java Program to Send Image between Computers using UDP and Display it

java program java code java application to send image files (photos or pictures) between computer using UDP across Network
Java program to send image file over network using UDP
This was one of my experiments in Networking Lab. The aim was to write a java program to send a
picture (image) from a computer to another via network using UDP protocol and to display it at the receiving end. Simply, this is the java code to make a java application which can send images from one computer to another over a network. The program uses UDP (User Datagram Protocol). For both the computers (on either ends) the same code is enough. This app can act as a image sender or a receiver. The program uses a Progress bar (JProgressBar) to show the progress of the data transfer. Remember, transferring files over UDP is not easy because UDP does not guarantee ordered delivery, and not even successful delivery. So, here in this program, to ensure ordered delivery, the sender sends next chunk of data (DatagramPacket) only after receiving an acknowledgement for last sent packet. For acknowledgement, i used a string "ACK".

How to Get Center Point of Screen in Java

If you want position your JFrame in center of screen, there is method for that. Read this post:

The LocalGraphicsEnvironment in Java will give you the center point of the display or screen. There is a static method getLocalGraphicsEnvironment() in GraphicsEnvironment class. To get the center point of the screen, you may use the following java code:


Point centre=GraphicsEnvironment.getLocalGraphicsEnvironment().getCenterPoint();

You should include these import statements in the file.

import java.awt.Point; import java.awt.GraphicsEnvironment;

Free, Simple and Light weight Download Manager Java Application - Application and Source Code

This is a free Internet Download Manager Application for PC developed in java and free to use. It is
very light weight with size only below 50KB. This download manager allows pause and resume for downloads and requires java jre 1.8 to run. The program source code is given below. This will help you to understand how to download files from internet using java. The program may help you to understand how to pause and resume downloads in a java program. The application also provides drag and drop support. You can drag a link to file to be downloaded from browser in to the drag and drop area (drop target) in the application and it will automatically start download or add to the download queue. This will also help you study how to use Drag and Drop and how to set a drop target.

Download free Download Manager Application for Computer


You may download the  lightweight java Download Manager Software from following link:

https://drive.google.com/file/d/0B5WYaNmq5rbueUl5bW03VllIc2M/view?usp=sharing

View Source code


YouTube Video Locator For YouTube Partners (Uploaders) to Check Keyword Optimisation in YouTube

In this post, i am sharing an application which will help you to check the search engine optimization of your youtube video. The inputs for this java application are your channel address and the keywords to search for. The application will tell you in which page does your video come for that combination of keywords. This app was coded by myself when i was a youtube uploader. This can be useful for YouTube partners (uploaders). You require JRE 1.8 or later installed in your computer to run this lightweight application software. You can locate your video in youtube search results and check how much search optimised is your video for the given keyword. You can download the java application from following link.

Download YTViewer Youtube Video Locator for YouTube Partners (YouTube upoaders)

Bank Application in Java - Simulation of Banking Services in Java

Java Banking services simulation application java program java source code java code java simple sample banking application banking software
Java Banking services simulation application
This is a simple bank simulation application in java. The application first asks username and password. The default username and password for the application :

username: operator1
password: password

You can change this username and password in the application. This java bank application software supports following banking services.


  • Opening a new account
  • Money Withdrawal from the bank account
  • Making Deposits in the accout
  • Transfer of funds


TCP Server Client Two Person Chat Program in Java with GUI

Server-Client chat program or two way chat using TCP connection is a common problem for java practical labs or networking labs. Here this post introduces a simple lightweight Server client two person chat program using java. The program uses ServerSocket and Socket classes available in java.net package. This program is written so as to use the same as server or as client. Both the persons who chat use the same program. One should select hosting (acting as server) while the other could connect to him by entering the server ip address. I have added screenshots of the program also.
See Screenshots