Java Tutorial

Simple Antivirus using MultiThreading

Submitted by moazkhan on

TUTORIAL NO 3

Antivirus using MultiThreading

In this tutorial you will learn: 1. MultiThreading 2. Recursion 3. Event handling 4. Layout Manager 5. JAVA awt basics 6. JAVA swing basics 7. Adapters 8. Anonymous classes Sometimes there is a very basic virus in your system i.e a file spread in all the directories of your disk drive. It’s totally an unwanted file (You can say a virus ) and it may be sometimes hidden but you can see it in the task manager.

Unwanted Text Space Remover

Submitted by moazkhan on

TUTORIAL NO 2

Text Space Remover

In this tutorial you will learn:
  1. Event handling
  2. Layout Manager
  3. JAVA awt basics
  4. JAVA swing basics
  5. Adapters
  6. Anonymous classes
  7. Using two separate classes
Very often I face a problem when copying from PDF that there are random spaces in the text. So I decided to make a simple app for text adjustment. In this tutorial I will teach you how to make unwanted text space remover.

Game - Click Me if you can

Submitted by moazkhan on

TUTORIAL NO 1

Your First JAVA Game In this tutorial you will learn: 1. Event handling 2. JAVA awt basics 3. JAVA swing basics 4. Intefaces This program will guide you how to make your own very basic JAVA game. We are going to call this game CLICK ME IF YOU CAN. Click Me In this tutorial we will be working in JAVA SWING. The first thing that we are going to do is setting up a JFrame and adding the required panels and Components.

Creating Threads in Java

Submitted by donbermoy on
Today in Java, I'm going to teach you how to create a program that will create threads. We all know that a thread is a basic processing unit in our computer to which an operating system allocates processor time, and more than one thread can be executing code inside a process. The Java Virtual Machine (JVM) allows an application to have multiple threads of execution running concurrently. Thus, threads have priority. It is just like a racing program. So, now let's start this tutorial! 1.

ProgressBar Component in Java

Submitted by donbermoy on
Today in Java, i will teach you how to create a progressbar component using JProgressBar control in Java. So, now let's start this tutorial! 1. Open JCreator or NetBeans and make a java program with a file name of ProgressBar.java. 2. Import javax.swing.* package because we will going to have the JProgressBar, JFrame, SwingUtilities in swing and also the JPanel as the container of this.

Copy Data to a File into Another File using Java

Submitted by donbermoy on
Today in Java, I will teach you how to create a program that copies data of a file into another file using the FileInputStream and FileOutputStream of the IO package. So, now let's start this tutorial! 1. Open Notepad. Put any data in there, for example, i have write "Sourcecodester is the best!". Save it to the same folder with your java program and named it as data1.txt. Now, create another text file using Notepad and leave it blank. Name this as data2.txt. 2.

How to add a delay in your program in Java

Submitted by donbermoy on
For this Java tutorial today, i will going to teach you how to create or a delay in your program. So, now let's start this tutorial! 1. Open JCreator or NetBeans and make a java program with a file name of addDelay.java. We will not import anything here because we will not access any class out from the packages. 2.

Get day, day of week, day of month, day of year, month, and year values from the current date using Java

Submitted by donbermoy on
In this tutorial, we will create a program that gets day, day of week, day of month, day of year, month, and year values from the current date using Java. I have already discussed how to get the date and time, but here in this program, we will breakdown and get the complete information on the current date. So, now let's start this tutorial! 1. Open JCreator or NetBeans and make a java program with a file name of subString.java. 2.

Change Default Cursor to Hand Cursor in Java

Submitted by donbermoy on
In this tutorial, we will create a program that will change the default cursor into a hand cursor in java like the image below. hand cursor So, now let's start this tutorial! 1. Open JCreator or NetBeans and make a java program with a file name of jCursor.java. 2. Import java.io package. Hence the cursor class is in the input/output library.

How to Check if a File is Hidden or Not using Java

Submitted by donbermoy on
In this tutorial, i will teach you how to create a program in java that will check if a file is hidden or not. So, now let's start this tutorial! 1. Open Notepad. It's up to you if you will write data in there or not. Save it to the same folder with your java program and named it as READ FIRST.txt. and make sure to hide this file. 2. Open JCreator or NetBeans and make a java program with a file name of hiddenFile.java. 3. Import java.io package. Hence the file class is in the input/output library.