This article will describe how to encrypt and decrypt a file in java. We shall demonstrate file encryption using example source code.This source code has been tested to work not only on text files but also on audio video files and images.The name of the file, encrypt/decrypt and the password to be used for the Continue Reading …
Category: Java
Automatically update jLabel from values in jTextfield in java
How to have a jLabel update its values automatically from the values in a jTextField.This article will describe how to update the jLabel from the jTextfield values automatically along with example source code. Assume that you have a jLabel called jLabel3 and a jTextfield called jTextField1 Here is the source code to be used.The keyReleased Continue Reading …
Java run code before exit of the application
If you want to run a section of code immediately before your application exits then this article will tell you how to do it. We will be using the WindowClosing event of the main JFrame class of your application. In the Deign View of your application in the project component navigator right click the JFrame Continue Reading …
Design java swing application with multiple windows
This article will describe how to design a java swing application with multiple windows.The multiple windows will be created with the help of multiple overlapping jPanels of same size within the main jFrame.The example source code will fully illustrate this.You will thus be able to invoke multiple gui windows on click event, where actually one Continue Reading …
Open windows help file on button click in java application
This article will describe how to open a windows help file .chm file in a java application as a result of a button click or click on a menu item, along with example source code to achieve the result. Add the following code to the actionperformed event of the button or the menu item Continue Reading …
Set windows look and feel in java swing application
Setting windows look and feel in a java swing application is easy.This article will explain with the required source code ,how to set windows look and feel for your java swing application. Go to the class which has the main function. Comment the code for the existing look and feel and add the following code Continue Reading …