Saturday, 8 August 2015

WHERE TO DOWNLOAD JAVA

http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html


you can go through this site to download java programme.

Friday, 24 July 2015

If there is any problem in java. you can email it at kmpiyush89@gmail.com


LABELS, BUTTONS, CHECKBOXES, TEXTFIELDS

Theory behind forming the LABELS, BUTTONS, CHECKBOXES, TEXTFIELD.
1) Labels
      A) label() - create an empty label.
        B) label(String) - create a label with the given string.
2) Buttons
      A) Button() - Create a button without any name.
        B) Button(String) - Create a button with the given desired name.
3) Checkboxes
      A) Checkbox() - Create a checkbox without any label.
        B) Checkbox(String) - Create a labeled checkbox.
4) Text Areas:
      A) TextArea() - Creates a blank textField.
        B) TextArea(rows,character) - Creates a text area of rows with certain numbers of character. 

SIMPLE THEORY ON COMPONENETS OF AWT.

The statement import java.awt.*; imports all the componenets,containers and layout managers for designing the user interface.
The AWT supplies necessary following components.
1) Labels (java.awt.Label)
2) Buttons (java.awt.Checkbox)
3) Checkboxes (java.awt.checkbox)
4) Single-line text field (java.awt.TextField)
5) Larger text display and editing areas (java.awt.TextAreas)
6) Lists (java.awt.list)
7) Sliders and scrollbars (java.awt.Scrollbar)
8) Drawing areas ( java.awt.Canvas)

SIMPLE PATH WAY TO WRITE AN APPLET

              HOW TO WRITE AN APPLET PROGRAMME
import java.awt.*;
import java.applet.*;
//<applet code="Appletprogramme" height="500" width="500"></applet>
publi class Appletprogramme extends Applet
{
// Called first;
public void init() {
// initialization
}
/* Called second; after init(); Also called whenever
the applet is restarted. */
public void start() {
// start or resume execution
}
// Called when the applet is stopped.

SIMPLE THEORY ON APPLET.

1)Applet: An applet is a java program that can be embedde in a web page. Java application are run by using a java interpreter. Applet are run on any browser that
   supports java Applets can also be tested using the appletviewer tool included in java development kit.

2)To run an applet it must be included in a web page, using HTML tags.

3)All applets sre subclasses of the Applet class in the java.applet package.

4)Applets do not contain void main() method.

5)Applets must be declared public: ex: (public class FileName extends Applet).

6)Applet display informations on the screen by using paint method. For example: public class paint(Graphic g).

7)To view an Appletviewer there must be written an Applet code. Applet code basically controls the dimensions of the viewer.  
                                                         For example: //<appletcode="File name" height="500" width="500"></applet>
                                                                                 ( // This means not to print in java)

8)The applet runs in a web page that is loaded in a web browser. But one thing must be reminded In your browser PLUGIN is must be installed.

9)The enviroment of the applet is known as the context of the applet.

10)The cycle of an Applet:
         A)The init() method: Basically it is called the first time an applet is loaded into the memory of the computer.
            B)The start() method: It comes immediately after the init() process. And can use this method when you want to restart a process.
               C)The stop() method: you can use this method to reset variables.
                  D)The destroy() method: you can use this method to perform clean-up operations like closing a file.


Thursday, 23 July 2015

SIMPLE WAY TO CREATE A CLASS FILE.

CLASS

PUBLIC CLASS CLASSNAME
{
//MEMBER DATA
//MEMBERFUNCTION
}

PUBLIC CLASS ABC
{
INT X=8;
PUBLIC VOID DISP()
{
sYSTEM.OUT.PRINTLN("X"+X)
}
}