/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package guitest; import javax.swing.*; /** * * @author jcmtiernan */ public class GUITest { /** * @param args the command line arguments */ public static void main(String[] args) { JFrame inFrame = new JFrame(); JTextArea iFArea = new JTextArea(); PersonInfo person1 = new PersonInfo(); GUIone inPanel = new GUIone(person1); JLabel nm; inFrame.add(inPanel); inFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); inFrame.setSize(300,300 ); inFrame.setVisible(true); //checkPrint(inPanel); //nm = new JLabel(inPanel.getFirstNm()+" "+inPanel.getLastNm()); //inFrame.add(nm); checkPrint(person1); //name.concat(inPanel.getFirstNm()+" "+inPanel.getLastNm()); //birthmonth = inPanel.getBirthMo(); //System.out.println(name+" was born in the "+birthmonth+" month"); //System.out.println("You typed in "+ inPanel.getFirstNm()); //iFArea.setText("You typed in "+ inPanel.getFirstNm()); //inFrame.add(iFArea); } public static void checkPrint(PersonInfo person1) { Integer birthmonth; birthmonth = person1.getBirthMo(); String name = new String(person1.getFirstNm()+" "+person1.getLastNm()); System.out.println(name+" was born in the "+birthmonth+" month"); } }