Empowering The World Through Technology

How to implements Item Listener in java Frams

2 283

How to implements Item Listener in java Frams. Here you will learn that how can we implement implements Item Listener in java Frams using AWT classes. Here is a complete java program that will show you that how we can apply ItemListener in java.

You can say that this complied java program will teach you that how you can create a frame or window in java that is looking like you are are creating a paint window.
Its means that you are developing a program to create a paint programe after some changing.

How to implements Item Listener in java Frams

import java.awt.event.*;
import java.awt.*;
class myframe extends Frame implements ItemListener
    Checkbox redchk,greenchk;
     CheckboxGroup grp;
     TextField txt;
   super(“Show the selected”);
   setBackground(new Color(245,25,25));
   addWindowListener(new WindowAdapter()
                 public void windowClosing(WindowEvent we)

grp=new CheckboxGroup();

redchk=new Checkbox(“red”,grp,true);

        greenchk=new Checkbox(“green”,grp,false);

          txt=new TextField(30);        


   public void itemStateChanged(ItemEvent ie)
         if (ie.getSource()==redchk)
              txt.setText(“Red Selected (By Kaleem)”);
                txt.setText(“Green Selected(By Kaleem)”);

class sajjad
  public static void main(String str[])
   myframe f=new myframe();

Here is also different java and asp.net programs like:

  1. How to connect java with database|Using JDBC-ODBC Connection string
  2. How to Create combo box in java|Complete Coding
  3. Java program to calculate Age from Date of birth
  4. How to create a Recruitment or job announcement page in asp.net | Complete front end designing and backend coding
  5. How to Add multiple textbox values and showing their sum
  6. Employee Registration form | Creation of Registration form in visual studio using c# and asp.net
  7. How add new webpage in a website using C#, asp.net in visual studio.
  8. How to create login page using asp.net and C#
  1. Manzoor Hussain says

    You are doing a great job by sharing complied programs of java.

    1. elm Seekho says

      Thanks Dear we will try to our best to provide you updated solution of Java, Asp.Net ,Php and as well as Oracle and SQL databases

Leave A Reply

Your email address will not be published.

%d bloggers like this: