Java

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.

Phone Info

Submitted by thakurnirbhay on
This is my 1st Application. My name is Nirbhay Singh student of Makhalal Chatuvedi University bhopal. I'm a student of MCA. I belong to Deoria Dist in U.P. Presently Work At Android Application Developement.

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.

JColorChooser Component in Java

Submitted by donbermoy on
Today, i will teach you how to create a program that has the JColorChooser component in Java. We have ColorDialog in VB.NET and C# and this is equivalent to the JColorChooser in Java. So, now let's start this tutorial! 1. Open JCreator or NetBeans and make a java program with a file name of colorChooser.java. 2. Import java.awt.* and javax.swing.* packages because we will going to have the JColorChooser component in swing and also the JPanel as the container of this.