https://www.fiverr.com/s2/3c7443ecb4

How to implements Item Listener in java Frams

elm Seekho 2

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. 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;
myframe()
{
   super(“Show the selected”);
   setBounds(100,100,500,500);
   setBackground(new Color(245,25,25));
   setLayout(null);
   addWindowListener(new WindowAdapter()
                              {
                 public void windowClosing(WindowEvent we)
                                {
                       System.exit(0);
                                 }
           });

grp=new CheckboxGroup();

redchk=new Checkbox(“red”,grp,true);
        redchk.setBounds(40,100,100,25);
         redchk.addItemListener(this);

        greenchk=new Checkbox(“green”,grp,false);
        greenchk.setBounds(40,150,100,25);
        greenchk.addItemListener(this);

          txt=new TextField(30);        
           txt.setBounds(40,190,200,30);

           setLayout(null);

         add(redchk);
          add(greenchk);
           add(txt);       
  setVisible(true);
}
   public void itemStateChanged(ItemEvent ie)
     {
         if (ie.getSource()==redchk)
          {
              txt.setText(“Red Selected (By Kaleem)”);
              }
          if(ie.getSource()==greenchk)
            {
                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#

2 thoughts on “How to implements Item Listener in java Frams

    1. 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. Required fields are marked *

Next Post

AIOU date Sheet for Autumn Semester 2018

AIOU has announced 2019 examinations date sheet for the autumn semester 2019. AIOU is going to take annual examination of the following subjects. Here you will fine: Date sheet for ATTC Date Sheet for PTC Date sheet for CT Date sheet for B.ED(Old) Date sheet for Matric Date sheet for FA/F.Sc/ Date aheet for Dip in Education Date sheet Open Tech Date sheet for B.A Programs