List Demo Java source code
#1

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

                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");

                add(os);
                add(browser);

                os.addActionListener(this);
                browser.addActionListener(this);

        }
        public void actionPerformed(ActionEvent ae)
        {
                repaint();
        }
        public void paint(Graphics g)
        {
                int idx[];
                msg = "Current OS   ";
                idx = os.getSelectedIndexes();
                for(int i=0; i<idx.length;i++)
                        msg += os.getItem(idx[i]) + "  ";
                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: resistance demo, maglev demo, project report demo in java code project, list of projects in java, vb6 0 demo projects with source code pdf, wow tmorph code list, geolocation 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)

Messages In This Thread
List Demo Java source code - by smart paper boy - 30-08-2011, 12:31 PM

Possibly Related Threads...
Thread Author Replies Views Last Post
  Simple Key Events Java source code smart paper boy 3 3,589 07-02-2017, 03:41 PM
Last Post: NARESHLAFOOT
  Window Events Java source code smart paper boy 1 3,667 02-03-2012, 10:48 AM
Last Post: seminar paper
  Inter net banking java source code smart paper boy 3 5,933 01-03-2012, 11:24 AM
Last Post: seminar paper
  UDP server java source code smart paper boy 1 3,806 05-01-2012, 05:50 PM
Last Post: jeslinapeter
  UDP client Java source code smart paper boy 2 3,666 12-12-2011, 09:56 AM
Last Post: seminar addict
  Text Demo Java source code smart paper boy 0 2,073 30-08-2011, 12:44 PM
Last Post: smart paper boy
  Text Area Demo Java source code smart paper boy 0 2,083 30-08-2011, 12:44 PM
Last Post: smart paper boy
  Servlet Database Java source code smart paper boy 0 2,456 30-08-2011, 12:42 PM
Last Post: smart paper boy
  server test Java source code smart paper boy 0 2,257 30-08-2011, 12:42 PM
Last Post: smart paper boy
  Ser To App java source code smart paper boy 0 1,672 30-08-2011, 12:39 PM
Last Post: smart paper boy

Forum Jump: