Enum (eration) in Java

Here you can see the structure of Enum class in java. This class have their own rules and regulation.In this class there is no use of public except in the method value and class access because it doesn’t give any access to client. Some changable user-defined are written in italics.

For enum define , Just use below syntax

Read More »Enum (eration) in Java

Frame Height in Applet

Actually the the height we defined for JFrame may differ as what we assume . In windows JFrame uses its height including it’s title bar and the bottom border of window frame.It can be illustrated below :
Let’s we code the JFrame size.

In this code we can see that we defined a JFrame size to 100px width and 100px height. But actually some programmer feels problem on the height of the windows size , even we had declare the size of the JFrame to 100. The JFrame height includes the title bar and it’s bottom liner height.

Read More »Frame Height in Applet

Some String's Features

Here you can learn some of the features of the string which help in searching the words as wells.This String is written in Capital S because it’s a separate class can be found in java. The String have many function, it’s an array of the Character .

Some examples of String uses

– Serial numbers which is generated by the help of String .

Let’s start creating a java file named SymbolNo.java

Read More »Some String's Features

Text Field

The Text Field in java specially instantiated from JTextField by importing
javax.swing.*;
Here now we are gonna make a simple textfield with definite size and it’s position in JFrame.

First of all we should know dat JFrame, JPanel, JTextField are the classes of the java.swing.These all classes are included in Java swing hierarchy.Now to code for textfield we’ll need the Layout and dat will be defined soon by ourself.In Defaut the java uses it’s own Layout for textbox.The main code for defining the position and size is given below:
textbox_name.setBounds(x_axis,y_axis, width, height);

Read More »Text Field