Skip to main content

Posts

Showing posts from January, 2016

Awt example

                               Awt Applet We will have to make use of the HTML  tag , to include the applet. <applet code=”classname” height=px width=px> </applet> PROGRAM-1 import java.applet.*; import java.awt.*; /*         <applet code=”AppletDemo” height=200 width=200> </applet> */ public class AppletDemo extends Applet {                   String s;                   public void init()                   {                            ...

Awt classes

                                   Awt classes Following are the list of some AWT classes: Class Description AWTEvent Encapsulates AWT events. AWTEventMulticaster Dispatches events to multiple listeners. BorderLayout The border layout manager. Border layouts use five components: North, South, East West, and Center. Button Creates a push button control. Canvas A blank, semantics-free window. CardLayout The card layout manager. Card layouts emulate index cards. Only the one on top is showing. Checkbox Creates a checkbox control. CheckboxGroup Creates a group of check box controls. CheckboxMenuItem Creates an on/off menu item. Choice Creates a pop-up list. Color ...

ABSTRACT WINDOWS TOOLKIT

          ABSTRACT WINDOWS TOOLKIT GRAPHICAL USER INTERFACE USING ABSTRACT WINDOWS TOOLKIT The graphical user interface is implemented in the java using the AWT, which stands for the Abstract Windows Toolkit. It contains all the classes for defining the components of the GUI  like command buttons , list boxes ,drop down list boxes, etc. Java Graphics APIs - AWT and Swing - provide a huge set of reusable GUI components, such as button, text field, label, choice, panel and frame for building GUI applications. You can simply reuse these classes rather than re-invent the wheels. I shall start with the AWT classes before moving into Swing to give you a complete picture. I have to stress that many AWT component classes are now obsolete. They are used only in exceptional circumstances when the JRE supports only JDK 1.1. Java provides the package for AWT. java.awt.*;

Multiple Inheritances

                            Multiple inheritance interface A {             void m1(); } interface B {             void m2(); } interface C extends A,B {             void m3(); } class D implements C {                         public void m1()                         {                                     System.out.println(...

Inheritance in the Interfaces

                                 inheritance in interfaces Inheritance in the Interfaces:             interface A             {                         void m1();             }             interface B extends A             {                         void m2();             }         ...

program of interface

program of interface PROGRAM-             interface A             {                         void m1();             }             class B implements A             {                         public void m1()                         {                     ...