Choice Demo Java source code
#1

Code:
import java.awt.*;
import java.applet.*;
import java.awt.event.*;
/*
<applet code="ChoiceDemo" width=300 height=300>
</applet>
*/
public class ChoiceDemo extends Applet implements ItemChoiceener
{
        String msg = " ";
        Choice os,browser;
        public void init()
        {
                os = new Choice();
                browser = new Choice();

                os.add("Window 98");
                os.add("Window NT");
                os.add("Solaris");
                os.add("MacOS");

                browser.add("Netscape 1.1");
                browser.add("Netscape 2.x");
                browser.add("Netscape 3.x");
                browser.add("Netscape 4.x");

                browser.add("Internet Explorer 2.0");
                browser.add("Internet Explorer 3.0");
                browser.add("Internet Explorer 4.0");

                browser.add("Lynx 2.4");
                browser.select("Netscape 4.x");

                add(os);
                add(browser);

                os.addItemChoiceener(this);
                browser.addItemChoiceener(this);

        }
        public void itemStateChanged(ItemEvent ie)
        {
                repaint();
        }
        public void paint(Graphics g)
        {
                msg = "Current OS";
                msg += os.getSelectedItem();
                g.drawString(msg,6,120);

                msg = "Current Browser";
                msg += browser.getSelectedItem();
                g.drawString(msg,6,140);

        }
}
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: project report demo in java code project, demo of textarea, how to get into a college of your choice, hdfc net banking demo, multiple object tracking demo, vb6 0 demo projects with source code pdf, resistance demo,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  projects in core java project topics 6 16,084 16-01-2018, 11:15 AM
Last Post: dhanabhagya
  Steganography implemented in Java science projects buddy 14 12,146 24-05-2016, 10:15 AM
Last Post: dhanabhagya
  STUDENT INFORMATION SYSTEM IN JAVA project topics 14 10,562 19-08-2015, 11:28 PM
Last Post: Guest
  mini projects in java project topics 7 18,779 01-05-2015, 04:18 PM
Last Post: seminar report asees
  Visa Processing System full report and asp source code project topics 2 5,514 19-06-2014, 06:54 PM
Last Post: seminar report asees
  distributed cache updating for the dynamic source routing protocol project report tiger 4 3,000 05-03-2013, 02:22 PM
Last Post: Guest
  application projects in java and vb.net (titles and topics) project topics 1 5,468 28-11-2012, 01:11 PM
Last Post: seminar details
  Energy-Efficient Routing in Mobile Ad Hoc Networks: Mobility-Assisted Case (Java) project topics 1 1,741 12-11-2012, 12:42 PM
Last Post: seminar details
  Net Auction java based project report project topics 2 3,691 01-11-2012, 12:59 PM
Last Post: seminar details
  distributed applications using RMI-Java model. seminar class 1 1,467 31-05-2012, 12:29 AM
Last Post: Guest

Forum Jump: