Showing posts with the label Windows ProgramsShow all

13) The Card Layout demonstration program

source file name: CardLayoutDemo.java  import java.awt.*;   import java.awt.event.*;   public class CardLayoutDemo extends Frame implements ActionListener {   CardLayout card;   Button b1,b2,b3;   Panel p;   public  CardLayoutDemo() {                      p=new Panel();         card=new CardLayout(40,30);           p…

Read more

12) The screen designing by Border Layout Manager

source file name: BorderDemo.java  import java.awt.*; import java.awt.event.*; class BorderDemo extends Frame { String str="National Pledge"+ "\n India is my country and all Indians are my brothers and sisters."+ "\n I love my country and I am proud of its rich and varied heritage."+ &qu…

Read more

11) Students Biodata screen using Action Event

source code name: awtbiodata.java     import java.awt.*;       import java.awt.event.*;  class awtbiodata extends Frame implements ActionListener { Label l1,l2,l3,l4,l5,l6,l7; TextField t1,t2,t3; TextArea ta; List ls; Choice ch; Checkbox cb1,cb2;  public awtbiodata() {   GridLayout fl=new GridLayout(0,2,10,10); setLa…

Read more

10) Drawing three different Polygons on screen.

source code name: drawpolygons.java  import java.awt.*; class drawpolygons extends Frame { int x[]={100,60,60,100,150,150}; int y[]={100,150,200,250,200,150}; int x1[]={200,120,280}; int y1[]={270,350,350}; int x2[]={300,220,300,380}; int y2[]={100,150,220,150,}; public void paint(Graphics g) { g.drawPolygon(x,y,6); …

Read more

9) Display image on screen

source code name: showimage.java Image source file existence is mandatory    import java.awt.*; class showimage extends Frame { public static void main(String as[]) { System.out.println("windows programming"); showimage f=new showimage(); f.setTitle("Image Display Program"); f.setSize(300,500); f.…

Read more