/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package windowtest; import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.*; //import javax.swing.JFrame; /** * * @author jcmt */ public class WindowTest { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here String[] nNames = {"Janice", "Carter", "Matheney", "Tiernan"}; Scanner input = new Scanner(System.in); ArrayList Booklist = new ArrayList(); Bookdata temp = new Bookdata(); Bookdata t3; int i; for (i=0; i < 3; i++) { System.out.println("Enter a title"); temp.setTitle(input.nextLine()); System.out.println("Enter a cost"); temp.setCost(input.nextDouble()); input.nextLine(); Bookdata t2 = new Bookdata(temp); Booklist.add(t2); } for (i = 0; i < 3; i++) { System.out.println(Booklist.get(i).getTitle()); } /* JFrame frame = new JFrame("Push Counter"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); PushCounterPanel panel = new PushCounterPanel(); frame.getContentPane().add(panel); //Dimension d = new Dimension(300,400); frame.setSize(300,100); frame.setLocation(500,500); frame.setVisible(true); */ JFrame frame2 = new JFrame("Bookstuff"); frame2.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); BookdataPanel panel2 = new BookdataPanel(Booklist); frame2.getContentPane().add(panel2); frame2.pack(); frame2.setVisible(true); /* JFrame frame3 = new JFrame("Quotes"); frame3.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); QuotesPanel panel3 = new QuotesPanel(); frame3.getContentPane().add(panel3); frame3.pack(); frame3.setLocation(250,250); frame3.setVisible(true); */ /* JFrame frame4 = new JFrame("Java Juke Box"); frame4.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //QuotesPanel panel3 = new QuotesPanel(); JukeBoxControls panel4 = new JukeBoxControls(); frame4.getContentPane().add(panel4); frame4.pack(); frame4.setLocation(100,250); frame4.setVisible(true); */ //Window2Button w2B = new Window2Button(); //w2B.ListInAWindow(nNames); //w2B.AddBWindow(args); } }