Search This Blog

How to Set JFrame in Center of Screen

By default, a java application appears at top left corner of the screen. You might have seen that most of the applications appear in the middle of the screen. I will tell you how to center your java application on screen.

To set JFrame in center of Just call this.setLocationRelativeTo(null); in constructor of the JFrame. If you are using Netbeans IDE, it should be after calling initComponents() method. But if you call setLocation() method of JFrame after this, your JFrame will get relocated.

In most cases this works and this is enough. if you want to get the center point of the screen, just refer to the following post:

How to Get Center Point of Screen in Java

How to Set Background Color of a JFrame in Java

It is easy to set Background color of a JFrame in java. But still many people cannot do it (me too was once like this). Most such people may have tried this java code to set java JFrame background color: setBackground(Color.BLACK);. But this won't work. Instead, you should set the background color of the ContentPane of the JFrame. So, use the following code to set Background color of Frame in your Java Application.

getContentPane().setBackground(Color.BLACK);

or


getContentPane().setBackground(new Color(34,172,176));

Keep in mind that you have to import java.awt.Color; You can use the first one if you don't know RGB values of the desired color. Most common colors are defined as constants in Font class. If you know the RGB color values for your desired color, you can use the second example.

How to Change Look and Feel of a Java Application

The following code fragment which can be used within main method or in constructor of the class tells you how to change the look and feel of a java program (java application). This sample code sets the LookAndFeel of the java application into Windows Look and Feel.


Java Application Source Code to Scroll Text Along JFrame

This is a simple java program for beginners to show how to scroll text in the JFrame. The program uses an anonymous (unnamed) thread object to move the scroll or move the text. The Thread moves two JLabel objects (containing text) by repeatedly calling setLocation(int x, int y) method of JLabel. The speed of the motion of text in this program can be changed by changing value of i or changing sleep period of the thread.


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


Free Two Person Text Chatting Application Software for Local Networks using Java With Source Code

two person text chat program java program java code java source code program code free chatting application free local network chatting free LAN Chatting LAN messenger
Java text Chatting program
Free two person chat program for local networks. This java text chatting application can be used for two person chatting within private or local networks. This java application uses TCP connection.

How to use

Both users should open this java application in their computer. One of them should click Make a Connection  while the other should enter the first person's ip address in the textfield provided and click Connect to this IP.

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

Simple Pause and Resume Supported Download Manager using Java

In this post i am adding a simple download manager made using java programming language. The file is light weight. This java application supports pause and resume. You can resume a paused download at any time if the url is resume supported. This java desktop application maintains a simple download queue. You can directly drag and drop download links into this java download manager app or add paste links. When the app exits, it saves it current progress and download queue so that you can easily resume the download in this java download manager desktop app when you start the application later.
free download manager for computer in java. lightweight and compact
Free Java Download Manager for 

Features:

  • Light weight
  • Pause and resume supported
  • Drag and drop download links
  • Download queuing supported.
  • Source code available


Download DownloadManager.jar (app) here.