Skip to main content

java GUI

JAVA Catch the Eggs Game Programming part1

TUTORIAL NO 6

JAVA Catch the Eggs Game Programming part1

In this tutorial you will learn: 1.Game Programming 2.CardLayout 3.Changing screens in the game 4.Internal Classes 5.Swing Animations 6.Event handling 7.JAVA awt 8.JAVA swing 9.Adapters 10.BoxLayout Today I am going to teach you how to make a simple yet fun game in JAVA. This tutorial will be divided into two parts so that thing remain simple and everyone could easily understand.

ProgressBar Component in Java

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.

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

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

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.

How to get a SubString of a String in Java

This is a tutorial in which we are going to create a program that gets substring of a string in java. We all know that a substring is a part of a sentence or a string. Java String class provides substring method with some overloaded parameter. 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. Import java.lang package because in this library, substring class is there.

How to Check if an Inputted Year is a Leap Year using Java GUI

In this tutorial, i will teach you how to check if an inputted year as leap year or not. Hence we already know that leap year has 366 days instead of the normal 365 days. Leap years occur every 4 years. And this fact is our formula in finding a leap year using Java GUI. So, now let's start this tutorial! 1. Open JCreator or NetBeans and make a java program with a file name of leapYear.java. 2. Import javax.swing package. Hence we will use a GUI (Graphical User Interface) here like the inputting the year.

Set Font and Color to Text of JTextArea Component in Java GUI

This is a continuation of my other tutorial entitled JTextArea Component in Java GUI. This tutorial will teach you how to set/select font and color for the JTextArea or JTextField component. 1. First and foremost, Open JCreator or NetBeans and make a java program with a file name of jTextArea.java. When you click the link above, copy first all the code there. import java.awt.*; import javax.swing