{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

LAB4 - import javax.swing import for graphics import...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
import javax.swing.*;// import for graphics import java.awt.*;// import for graphics import java.awt.event.*;// import for graphics import com.sun.speech.freetts.*; //import for voice public class ButtonIcon extends JFrame implements ActionListener // class extends to JFrame and implements actionListener { public String Labels[] = {"and","the","Hi","You","hey","Sorry","Please","Thank You","Appreciate","Cool","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z",}; public JButton butts[] = new JButton [Labels.length];// Jbutton arrays public ImageIcon picture1; public ImageIcon picture2; public JButton exitButton; public JTextField writebox; public JComboBox myCombo; public JButton BackspaceButton; public JButton SpaceButton; public Voice helloVoice; public JButton SpeakButton; public Timer clock; public int i = 0; public ButtonIcon() { setSize( 800, 600 ); setDefaultCloseOperation(EXIT_ON_CLOSE); picture1 = new ImageIcon( "Exit1.jpg"); // attach picture to button picture2 = new ImageIcon("speak.jpg"); // attach picture to button JPanel region3 = new JPanel(); region3.setLayout(new GridLayout(1,2));
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern