VoteCounter - // Creates the main program frame.

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
//********************************************************* // // // Demonstrates a graphical user interface and event listeners to // tally votes for two candidates, Joe and Sam. //********************************************************* import javax.swing.JFrame; public class VoteCounter { //----------------------------------------------
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: // Creates the main program frame. //----------------------------------------------public static void main(String args) { JFrame frame = new JFrame("Vote Counter"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().add(new VoteCounterPanel()); frame.pack(); frame.setVisible(true); } }...
View Full Document

This note was uploaded on 03/22/2010 for the course CS 202 taught by Professor Fong during the Spring '10 term at SIU Carbondale.

Ask a homework question - tutors are online