Java

KeyStroke/KeyPress in Java

Submitted by donbermoy on
This tutorial will teach you how to create a program in java that has a KeyPress or KeyStroke. So, now let's start this tutorial! 1. Open JCreator or NetBeans and make a java program with a file name of keyStroke.java. 2. Import the following package library: import java.awt.event.*; // used to access the ActionEvent clas import javax.swing.*; //used to access the AbstractAction,Action,ActionMap

Undo Text using Ctrl Z in Java

Submitted by donbermoy on
This tutorial will teach you how to create a program that can undo a text using a shortcut key of ctrl+z in java. So, now let's start this tutorial! 1. Open JCreator or NetBeans and make a java program with a file name of undoCtrlZ.java. 2. Import the following package library: import java.awt.event.*; //used to access ActionEvent class import javax.swing.*; //used to access AbstractAction,JFrame

How to have a Center Screen Window in Java

Submitted by donbermoy on
Some of the programs in java is set to its user location using the setLocation method of the JFrame or JWindow because they find it hard to center their window screen. So here in this tutorial, we will create a program that has a center screen window in Java. Now let's start this tutorial! 1. Open JCreator or NetBeans and make a java program with a file name of centerScreen.java. 2. Import the

How to Create a Matte Border in Java

Submitted by donbermoy on
This tutorial will teach you how to create a matte border in Java. A matte border has a matte pattern. This border can create a color matte border which is solid and an icon matte border which is tiled. So, now let's start this tutorial! 1. Open JCreator or NetBeans and make a java program with a file name of matteBorder.java. 2.

How to Create an Etched Border in Java

Submitted by donbermoy on
This tutorial will teach you how to create an etched border in Java. An etched border has an etched-in or etched-out effect and in default it is in etched-in effect. Like bevel borders, it has also constants of raised and lowered etched. So, now let's start this tutorial! 1. Open JCreator or NetBeans and make a java program with a file name of etchedBorder.java. 2.