Tuesday, 27 October 2020

Program to create text file, write some data and read the same using single character method without using string functions

 In this tutorial, you'll learn how to create TEXT file, write some data to file and read the data from text file.

Before going to start you should aware of the following concepts:



Program to split the words in sentence of string without using split in Java

 In this program, you'll learn how to split the words in sentence of string without using split() function.

Hello Guys, if you know about split( ) method of String class, it can be used to split the sentence into words.

Here in this program we will split the using without using this split() method. So let us start.



Tuesday, 29 September 2020

Program to design an applet which draws a circle (having color BLUE) inside a triangle (having color YELLOW)

Given program will draw a circle inside a triangle. The color of circle is "blue" and triangle having color "yellow". To fill circle with respective colours first we have to set the colour using setColor(Color c) method of Graphics class and then use the fillPolygon() and fillOval( ) method.

The fillPolygon( ) method Fills a closed polygon defined by arrays of x and y coordinates.

Monday, 20 November 2017

Program to create a Popup Menu using Java AWT

This tutorial shows you how to create a simple popup menu in Java. Popup menu is a menu which appears when you right click on mouse. For example, to copy, paste something in computer you right click and it will show the popup menu like:



Sunday, 19 November 2017

Program to create a simple Calculator using Java AWT components

This tutorial explains you how to create a simple Calculator using Java AWT components. The output of the program is given below. 



Sunday, 12 November 2017

Program to create a simple mini paint application

In this program, we will create a simple mini paint application using Frame class. We have to implement two types of events here: Mouse event and Key event. To use this program you have to use numpad keys on keyboard. The following keys are used for specific purpose:



Saturday, 11 November 2017

Program to demonstrate the Mouse events using Applet

In this program, we have to implement Mouse events. An event which indicates that a mouse action is occurred in a component. This event is used both for mouse events (enter, click, press, release, exit) and mouse motion events (moves, drags).