Skip to main content

Posts

Showing posts from May, 2017

Panel class example in java

                            Panel class in java Panel class ------------- This class is used to divide the window into various sub-section , each section is used as a panel or we can say is reffered as a panel .             The general form of creating the panel is ,                          Panel objectname=new Panel()             import java.applet.*; import java.awt.*; /*             <applet code="PanelDemo" height=200 width=200>         ...

Grid Layout with example

                        Grid Layout in java GridLayout class :                 ------------------------- The GridLayout class is used for creating the gird containing the specific number of rows and columns The constructors of the GridLayout class are : 1. GridLayout()             It is the default constructor of the GridLayout class . 2. GridLayout(int rows ,int cols)             It is the constructor which is used for creating the grid with the specific      number of rows and columns                         The general form is...

Border layout example

                     Border layout in java BorderLayout: The BorderLayout class divides the entire applet screen into five sections , North,South,East,West and Center. Constructors of the BorderLayout class             (a) Border Layout()                         This is the defalut constructor of the BorderLayout class.             (b) Border Layout(int hgap,int vgap)                         This constructor is used to define the horizontal and the vertical gap            ...

flow layout program

                              Flow layout in java Flow Layout: Constructor:             a) FlowLayout()                         It is the default constructor of the FlowLayout             b) FlowLayout(int align)                         This method is used to specify the alignment for the component which we place using this layout. The alignment is specified using the three static constants , LEFT,RIGHT,and CENTER.             ...