Articles with tag: java

Java tutorials

Playing With Text, Java Applet

“Play­ing With Text, Java Applet” is an Java Applet pro­ject that I have done for my pro­gram­ming sub­ject in first year of my study. The “Play­ing With Text, Java Applet” pro­ject let the user to enter a text and it will draw the text in dif­fer­ent man­ners such as diag­on­ally, around a circle, around a square and even there is an abil­ity to make the text animated.

To see the “Play­ing With Text, Java Applet” demo click here

Continue reading

Java Tutorials

How To Count Words and Characters In a Text In Java

“How To Count Words and Characters In a Text In Java” is a program that takes a file (typically .txt) and shows how many words and characters there are in the given file. It also provide a grade for the text which is based on the mean of words length. If the result of dividing number of characters by number of words gets greater than 6 the grade is “First” otherwise is “Second Upper”.

Continue reading

a simple Java applet game

Create a Naughty Circle Game in Java

“Create a Naughty Circle Game in Java” is a game that user try to click on a red circle, which is not possible because the red circle always moves according to the mouse coordination.

There are two Java Classes:

1- NaughtyCircle Class: which is the main class, which inherent the JFrame class with two Interface MouseListener MouseMotionListener.

2-NaughtyCircleControler Class: The Controller for the NaughtyCircle Class.

Continue reading

a real java program

A Real Java Program – Student Hostel Program

“A Real Java Program – Student Hostel Program” is simple kind of a commercial program which can be written in Java. The Program is designed for a student hostel with 100 rooms that can record a new student and also records their payments for the rent.  The Program is originally a case study in Java In Two Semester book which was edited and re created by me.

Continue reading

Java Tutorials

A Java Student Collection Class

‘A Java Student Collection Class’ is an example of a Java collection class. In this example I am trying to show you how to make arrays of object and how to work with them. In this example I use the word ‘Static’ for a couple of attributes and methods have a deep look at them to understand how to use them.

Continue reading