124 Study  (Free Education Portal) Indian Free E-Learning Platform
  • Home
  • 124 IELTS
  • AMAN IELTS
  • iEnglish Guru
  • Books
  • Support Us
  • Contact Us

Sunday, September 20, 2020

Write any code for event handling in Java Programming? by Ranjot Singh

September 20, 2020  BCA, BCA-6th Sem, Java  No comments

 



Answer. import java.awt.*;

import java.awt.event.*;

class  EventHandle extends Frame implements ActionListener{

TextField textField;

EventHandle()

{

textField = new TextField();

textField.setBounds(60,50,170,20);

Button button = new Button("Quote");

button.setBounds(90,140,75,40);

//1

button.addActionListener(this);

add(button);

add(textField);

setSize(250,250);

setLayout(null);

setVisible(true);

}

//2

public void actionPerformed(ActionEvent e){

textField.setText("Keep Learning");

}

public static void main(String args[]){

new EventHandle();

}

}

Email ThisBlogThis!Share to XShare to Facebook
Newer Post Older Post Home

0 comments:

Post a Comment

Social Profiles

TwitterFacebookGoogle PlusLinkedInRSS FeedEmail
  • 124 IELTS
  • Submission
  • Interest Calculator
  • Games Portal
  • Universities

Categories

Academic Task 2 BCA Question Answer BCA-3rd Sem Reading Test Question Paper IELTS Ebook Academic Task 1 BCA-6th Sem Computer Networks BCA-5th Sem Books C++ MIS Our Products Java Education HTML Speaking BCA English Software Engineering Punjabi Tips & Techniques Other Material GT Writing General Reading Notes BCA-1st Sem CELPIP Library ASP.NET BCA-4th Sem E-Commerce GK Grammar Prediction book B.Tech B.com BBA Free Ebooks Google MBA MCA PTU PU CHD Syllabus System Software offers Academic Task 2 VOCAB B.A CBSC Date Sheet Delhi University English Grammar Free Books ICSE LINKING WORDS Learn Punjabi Microsoft Mock Test News P.HD Press Release
  • Popular
  • Tags
  • Blog Archives
  • ROBERT ANTHONY’S HIERARCHY OF MANAGEMENT ACTIVITY by 124study
  • Syllabus for B.C.A 4TH-5TH SEM From Punjabi University Patiala
  • ਪ੍ਰਸ਼ਨ 1 . “ ਲੋਕ - ਧਾਰਾ : ਪਰਿਭਾਸ਼ਾ ਤੇ ਲੱਛਣ ਨਿਬੰਧ ਦਾ ਸਾਰ ਲਿਖੋ । " ( Pbi . Uni . 2011 ) ਜਾਂ ਲੋਕ - ਧਾਰਾ ਦੀ ਪਰਿਭਾਸ਼ਾ ਦਿੰਦੇ ਹੋਏ ਇਸ ਦੇ ਲੱਛਣਾਂ ਬਾਰੇ ਚਰਚਾ ਕਰੋ । ( Pbi Uni . 2012 ) ਡਾ : ਭੁਪਿੰਦਰ ਸਿੰਘ ਖਹਿਰਾ ਨੇ ਆਪਣੇ ਨਿਬੰਧ ‘ ਲੋਕ - ਧਾਰਾ : ਪਰਿਭਾਸ਼ਾ ਤੇ ਲੱਛਣ ਵਿਚ ਜੋ ਵਿਚਾਰ ਪੇਸ਼ ਕੀਤੇ ਹਨ , ਉਨ੍ਹਾਂ ਨੂੰ ਸੰਖੇਪ ਕਰ ਕੇ ਲਿਖੋ (What is Lok dhara ) by Jot chahal

 
Copyright © 124 Study (Free Education Portal) Indian Free E-Learning Platform | Created by Ranjot Singh Chahal