Skip to main content

Posts

Showing posts from August, 2017

Menu bar example ibn java

 Menu bar example using awt   import java.applet.*; import java.awt.*; /*   <applet code="MenuDemo" height=200 width=200>   </applet> */ public class MenuDemo extends Applet {             public void init( )             {                         Menus m = new Menus("Menu Bar Demo");                         m.resize(200,200); m.show();             } } class Menus extends Frame {             Menus(String s)   ...

Method in menu class in java

                Methods used in menu class   Methods : (i) add( )                         This method is used to add a menu item over the Menu.                         The general form is ,                                     add(MenuItem ); (ii) addSeparator( )                         This method is used to a separator or line which is used for creation a separat...

Menu with classes in awt java

                    Menu classes in java Menu is a set or the collection of options. The Bar just below the title bar is known as the menubar. The menubar is the collection of the menu names .   The classes which we will use in the creation of the menubar are                (i) MenuBar class             (ii) Menu class             (iii) MenuItem class   All these classes are present in the package java.awt.   MenuBar class : This class is used to create a menubar which will contain the menus. Constructor of   MenuBar: MenuBar( ) : It is the blank constructor of the Menubar class. Methods : add( ) : This method is used to add a menu into the menubar.        ...