Sunday, 18 December 2022

Design an applet/application to create form using Text Field, Text Area, Button and Label. Label 1 name : Enter your name Lable 2 name : Adress Button : submit

 

Design an applet/application to create form using Text Field, Text Area, Button and Label.  

Label 1 name : Enter your name

Lable 2 name : Adress

Button : submit




package com.javaguides.javaswing.login;

import java.awt.*;

public class BasicAWT
{
 public static void main(String args[])
 {
  Frame f = new Frame();
  f.setSize(400,400);
  f.setVisible(true);
  f.setLayout(new FlowLayout() );
 
  Label l1 = new Label();
  l1.setText("Enter Your Name ");
   
  TextField tf = new TextField(" enter name");
 
  Label l2 = new Label("Address");
  TextArea ta = new TextArea("",3,40);
 
  Button b = new Button("Submit");
   
  f.add(l1); f.add(tf); f.add(l2); f.add(ta); f.add(b);
 }
}



output: 




No comments:

Post a Comment

GitHub Most Imp Command For Every Developer Learn:

 Top Command for GitHub:  1) git clone 2) git init and git status   3) git add file name  or git add .  4) git commit -m message  5) git rem...