Projeto - Código Teclado.java
Autor: Projeto Arduino PUC-SP | Publicado: 2012-06-11T09:00:00-03:00

import java.util.*;
&nbsp; &nbsp;&nbsp;
public class Teclado extends javax.swing.JFrame{
&nbsp; &nbsp;&nbsp;

&nbsp; &nbsp; int teclas[] = new int[99999];
&nbsp; &nbsp; double tempoPressionado[] = new double[99999];
&nbsp; &nbsp; int qtdElementos=0;
&nbsp; &nbsp; String filetxt = "notas.txt";
&nbsp; &nbsp; long tempoSemTocarInicial=0, tempoSemTocarFinal, tempoSemTocarTotal;
&nbsp; &nbsp; long tempoApertadoDo, tempoSoltoDo, tempoTotalDo;
&nbsp; &nbsp; long tempoApertadoRe, tempoSoltoRe, tempoTotalRe;
&nbsp; &nbsp; long tempoApertadoMi, tempoSoltoMi, tempoTotalMi;
&nbsp; &nbsp; long tempoApertadoFa, tempoSoltoFa, tempoTotalFa;
&nbsp; &nbsp; long tempoApertadoSol, tempoSoltoSol, tempoTotalSol;
&nbsp; &nbsp; long tempoApertadoLa, tempoSoltoLa, tempoTotalLa;
&nbsp; &nbsp; long tempoApertadoSi, tempoSoltoSi, tempoTotalSi;
&nbsp; &nbsp; String texto[] = new String[999];
&nbsp; &nbsp; File_IO readWrite = new File_IO();
&nbsp; &nbsp; Scanner keyboard = new Scanner(System.in);
&nbsp; &nbsp; public Teclado() {
&nbsp; &nbsp; &nbsp; &nbsp; initComponents();
&nbsp; &nbsp; }
&nbsp; &nbsp;&nbsp;

&nbsp; &nbsp; @SuppressWarnings("unchecked")
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; private void initComponents() {
&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; jButton1 = new javax.swing.JButton();
&nbsp; &nbsp; &nbsp; &nbsp; jButton2 = new javax.swing.JButton();
&nbsp; &nbsp; &nbsp; &nbsp; jButton3 = new javax.swing.JButton();
&nbsp; &nbsp; &nbsp; &nbsp; jButton4 = new javax.swing.JButton();
&nbsp; &nbsp; &nbsp; &nbsp; jButton5 = new javax.swing.JButton();
&nbsp; &nbsp; &nbsp; &nbsp; jButton6 = new javax.swing.JButton();
&nbsp; &nbsp; &nbsp; &nbsp; jButton7 = new javax.swing.JButton();
&nbsp; &nbsp; &nbsp; &nbsp; jButton8 = new javax.swing.JButton();
&nbsp; &nbsp; &nbsp; &nbsp; jButton10 = new javax.swing.JButton();
&nbsp; &nbsp; &nbsp; &nbsp; jButton11 = new javax.swing.JButton();
&nbsp; &nbsp;&nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
&nbsp; &nbsp;&nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; jButton1.setBackground(new java.awt.Color(255, 255, 255));
&nbsp; &nbsp; &nbsp; &nbsp; jButton1.setText("Dó");
&nbsp; &nbsp; &nbsp; &nbsp; jButton1.setMaximumSize(new java.awt.Dimension(73, 23));
&nbsp; &nbsp; &nbsp; &nbsp; jButton1.setMinimumSize(new java.awt.Dimension(73, 23));
&nbsp; &nbsp; &nbsp; &nbsp; jButton1.setPreferredSize(new java.awt.Dimension(73, 23));
&nbsp; &nbsp; &nbsp; &nbsp; jButton1.addMouseListener(new java.awt.event.MouseAdapter() {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public void mousePressed(java.awt.event.MouseEvent evt) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jButton1MousePressed(evt);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public void mouseReleased(java.awt.event.MouseEvent evt) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jButton1MouseReleased(evt);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; });
&nbsp; &nbsp; &nbsp; &nbsp; jButton1.addActionListener(new java.awt.event.ActionListener() {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public void actionPerformed(java.awt.event.ActionEvent evt) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jButton1ActionPerformed(evt);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; });
&nbsp; &nbsp;&nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; jButton2.setBackground(new java.awt.Color(255, 255, 255));
&nbsp; &nbsp; &nbsp; &nbsp; jButton2.setText("Ré");
&nbsp; &nbsp; &nbsp; &nbsp; jButton2.setMaximumSize(new java.awt.Dimension(73, 23));
&nbsp; &nbsp; &nbsp; &nbsp; jButton2.setMinimumSize(new java.awt.Dimension(73, 23));
&nbsp; &nbsp; &nbsp; &nbsp; jButton2.setPreferredSize(new java.awt.Dimension(73, 23));
&nbsp; &nbsp; &nbsp; &nbsp; jButton2.addMouseListener(new java.awt.event.MouseAdapter() {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public void mousePressed(java.awt.event.MouseEvent evt) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jButton2MousePressed(evt);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public void mouseReleased(java.awt.event.MouseEvent evt) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jButton2MouseReleased(evt);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; });
&nbsp; &nbsp; &nbsp; &nbsp; jButton2.addActionListener(new java.awt.event.ActionListener() {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public void actionPerformed(java.awt.event.ActionEvent evt) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jButton2ActionPerformed(evt);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; });
&nbsp; &nbsp;&nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; jButton3.setBackground(new java.awt.Color(255, 255, 255));
&nbsp; &nbsp; &nbsp; &nbsp; jButton3.setText("Mi");
&nbsp; &nbsp; &nbsp; &nbsp; jButton3.addMouseListener(new java.awt.event.MouseAdapter() {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public void mousePressed(java.awt.event.MouseEvent evt) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jButton3MousePressed(evt);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public void mouseReleased(java.awt.event.MouseEvent evt) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jButton3MouseReleased(evt);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; });
&nbsp; &nbsp; &nbsp; &nbsp; jButton3.addActionListener(new java.awt.event.ActionListener() {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public void actionPerformed(java.awt.event.ActionEvent evt) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jButton3ActionPerformed(evt);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; });
&nbsp; &nbsp;&nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; jButton4.setBackground(new java.awt.Color(255, 255, 255));
&nbsp; &nbsp; &nbsp; &nbsp; jButton4.setText("Fa");
&nbsp; &nbsp; &nbsp; &nbsp; jButton4.addMouseListener(new java.awt.event.MouseAdapter() {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public void mousePressed(java.awt.event.MouseEvent evt) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jButton4MousePressed(evt);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public void mouseReleased(java.awt.event.MouseEvent evt) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jButton4MouseReleased(evt);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; });
&nbsp; &nbsp;&nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; jButton5.setBackground(new java.awt.Color(255, 255, 255));
&nbsp; &nbsp; &nbsp; &nbsp; jButton5.setText("Sol");
&nbsp; &nbsp; &nbsp; &nbsp; jButton5.addMouseListener(new java.awt.event.MouseAdapter() {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public void mousePressed(java.awt.event.MouseEvent evt) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jButton5MousePressed(evt);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public void mouseReleased(java.awt.event.MouseEvent evt) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jButton5MouseReleased(evt);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; });
&nbsp; &nbsp;&nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; jButton6.setBackground(new java.awt.Color(255, 255, 255));
&nbsp; &nbsp; &nbsp; &nbsp; jButton6.setText("La");
&nbsp; &nbsp; &nbsp; &nbsp; jButton6.addMouseListener(new java.awt.event.MouseAdapter() {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public void mousePressed(java.awt.event.MouseEvent evt) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jButton6MousePressed(evt);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public void mouseReleased(java.awt.event.MouseEvent evt) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jButton6MouseReleased(evt);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; });
&nbsp; &nbsp;&nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; jButton7.setBackground(new java.awt.Color(255, 255, 255));
&nbsp; &nbsp; &nbsp; &nbsp; jButton7.setText("Si");
&nbsp; &nbsp; &nbsp; &nbsp; jButton7.addMouseListener(new java.awt.event.MouseAdapter() {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public void mousePressed(java.awt.event.MouseEvent evt) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jButton7MousePressed(evt);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public void mouseReleased(java.awt.event.MouseEvent evt) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jButton7MouseReleased(evt);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; });
&nbsp; &nbsp; &nbsp; &nbsp; jButton7.addActionListener(new java.awt.event.ActionListener() {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public void actionPerformed(java.awt.event.ActionEvent evt) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jButton7ActionPerformed(evt);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; });

&nbsp; &nbsp; &nbsp; &nbsp; jButton8.setText("End");
&nbsp; &nbsp; &nbsp; &nbsp; jButton8.addActionListener(new java.awt.event.ActionListener() {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public void actionPerformed(java.awt.event.ActionEvent evt) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jButton8ActionPerformed(evt);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; });
&nbsp; &nbsp;&nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; jButton10.setText("Stop");
&nbsp; &nbsp; &nbsp; &nbsp; jButton10.addActionListener(new java.awt.event.ActionListener() {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public void actionPerformed(java.awt.event.ActionEvent evt) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jButton10ActionPerformed(evt);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; });
&nbsp; &nbsp;&nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; jButton11.setText("Start");
&nbsp; &nbsp; &nbsp; &nbsp; jButton11.addActionListener(new java.awt.event.ActionListener() {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public void actionPerformed(java.awt.event.ActionEvent evt) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jButton11ActionPerformed(evt);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; });
&nbsp; &nbsp;&nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
&nbsp; &nbsp; &nbsp; &nbsp; getContentPane().setLayout(layout);
&nbsp; &nbsp; &nbsp; &nbsp; layout.setHorizontalGroup(
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addGroup(layout.createSequentialGroup()
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addContainerGap()
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addComponent(jButton11)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE))
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addGroup(layout.createSequentialGroup()
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addComponent(jButton6, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE))
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addGroup(layout.createSequentialGroup()
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addComponent(jButton10)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addComponent(jButton8)))
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addGap(66, 66, 66))
&nbsp; &nbsp; &nbsp; &nbsp; );
&nbsp; &nbsp; &nbsp; &nbsp; layout.setVerticalGroup(
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addGroup(layout.createSequentialGroup()
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addGap(23, 23, 23)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addComponent(jButton7, javax.swing.GroupLayout.DEFAULT_SIZE, 243, Short.MAX_VALUE)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addComponent(jButton6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addComponent(jButton5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addComponent(jButton4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addGap(18, 18, 18)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addComponent(jButton8)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addComponent(jButton10)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addComponent(jButton11))
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .addGap(20, 20, 20))
&nbsp; &nbsp; &nbsp; &nbsp; );
&nbsp; &nbsp;&nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; pack();
&nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;&nbsp;

&nbsp; &nbsp; private void passarParaTxt(int elementos)
&nbsp; &nbsp; {
&nbsp; &nbsp; &nbsp; &nbsp; readWrite.openOutputFile(filetxt);
&nbsp; &nbsp; &nbsp; &nbsp; for(int i = 0;i&lt;elementos;i++)
&nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; readWrite.writeOutputLine(""+teclas[i]);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; readWrite.writeOutputLine(""+tempoPressionado[i]+"");
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; readWrite.closeOutputFile();
&nbsp; &nbsp; }
&nbsp; &nbsp; private void onExit()
&nbsp; &nbsp; {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;readWrite.openInputFile("Hack/Hack.ino");&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;int j=0;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;while(readWrite.hasInputLine())
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;texto[j] = readWrite.readInputLine();
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;System.out.println(texto[j]);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;j++;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;readWrite.closeInputFile();
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for(int i=0;i&lt;qtdElementos;i++)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(i==0)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;texto[1]= (teclas[i]+"");
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else{
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;texto[1]= (texto[1]+" ,"+ teclas[i]);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for(int i=0;i&lt;qtdElementos;i++)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(i==0)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;texto[4]= (tempoPressionado[i]+"");
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else{
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;texto[4]= (texto[4]+" ,"+ tempoPressionado[i]);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;texto[6] = ("int qtdElementos ="+ qtdElementos+";");
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;readWrite.openOutputFile("Hack/Hack.ino");
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;j=0;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;while(texto[j]!=null)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;readWrite.writeOutputLine(texto[j]);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;j++;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;readWrite.closeOutputFile();
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; }
&nbsp; &nbsp; private void comecarVazio()
&nbsp; &nbsp; {
&nbsp; &nbsp; &nbsp; &nbsp; tempoSemTocarInicial = System.currentTimeMillis();
&nbsp; &nbsp; }
&nbsp; &nbsp; private void terminarVazio()
&nbsp; &nbsp; {
&nbsp; &nbsp; &nbsp; &nbsp; tempoSemTocarFinal = System.currentTimeMillis();
&nbsp; &nbsp; &nbsp; &nbsp; tempoSemTocarTotal = tempoSemTocarFinal - tempoSemTocarInicial;
&nbsp; &nbsp; &nbsp; &nbsp; teclas[qtdElementos]= 0;
&nbsp; &nbsp; &nbsp; &nbsp; tempoPressionado[qtdElementos] = tempoSemTocarTotal;
&nbsp; &nbsp; &nbsp; &nbsp; qtdElementos++;
&nbsp; &nbsp; &nbsp; &nbsp; qtdElementos = checarCheio(qtdElementos);
&nbsp; &nbsp; }
&nbsp; &nbsp; private int checarCheio(int numeroDeElementos)
&nbsp; &nbsp; {
&nbsp; &nbsp; &nbsp; &nbsp; if(numeroDeElementos&gt;=99998)
&nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; passarParaTxt(numeroDeElementos);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; numeroDeElementos = 0;
&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; return numeroDeElementos;
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; }
&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;&nbsp;

&nbsp; &nbsp; private void jButton8ActionPerformed(java.awt.event.ActionEvent evt) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; onExit();
&nbsp; &nbsp; &nbsp; &nbsp; System.exit(0);
&nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; private void jButton1MousePressed(java.awt.event.MouseEvent evt) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; terminarVazio();
&nbsp; &nbsp; &nbsp; &nbsp; tempoApertadoDo = System.currentTimeMillis();
&nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; private void jButton1MouseReleased(java.awt.event.MouseEvent evt) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; tempoSoltoDo = System.currentTimeMillis();
&nbsp; &nbsp; &nbsp; &nbsp; tempoTotalDo = tempoSoltoDo - tempoApertadoDo;
&nbsp; &nbsp; &nbsp; &nbsp; teclas[qtdElementos]= 1;
&nbsp; &nbsp; &nbsp; &nbsp; tempoPressionado[qtdElementos] = tempoTotalDo;
&nbsp; &nbsp; &nbsp; &nbsp; qtdElementos++;
&nbsp; &nbsp; &nbsp; &nbsp; qtdElementos = checarCheio(qtdElementos);
&nbsp; &nbsp; &nbsp; &nbsp; comecarVazio();
&nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; private void jButton2MousePressed(java.awt.event.MouseEvent evt) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; terminarVazio();
&nbsp; &nbsp; &nbsp; &nbsp; tempoApertadoRe = System.currentTimeMillis();
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; private void jButton2MouseReleased(java.awt.event.MouseEvent evt) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; tempoSoltoRe = System.currentTimeMillis();
&nbsp; &nbsp; &nbsp; &nbsp; tempoTotalRe = tempoSoltoRe - tempoApertadoRe;
&nbsp; &nbsp; &nbsp; &nbsp; teclas[qtdElementos]= 2;
&nbsp; &nbsp; &nbsp; &nbsp; tempoPressionado[qtdElementos] = tempoTotalRe;
&nbsp; &nbsp; &nbsp; &nbsp; qtdElementos++;
&nbsp; &nbsp; &nbsp; &nbsp; qtdElementos = checarCheio(qtdElementos);
&nbsp; &nbsp; &nbsp; &nbsp; comecarVazio();
&nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; private void jButton10ActionPerformed(java.awt.event.ActionEvent evt) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; tempoSemTocarFinal = System.currentTimeMillis();
&nbsp; &nbsp; &nbsp; &nbsp; tempoSemTocarTotal = tempoSemTocarFinal - tempoSemTocarInicial;
&nbsp; &nbsp; &nbsp; &nbsp; passarParaTxt(qtdElementos);
&nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp; &nbsp;&nbsp;

&nbsp; &nbsp; private void jButton11ActionPerformed(java.awt.event.ActionEvent evt) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; tempoSemTocarInicial = System.currentTimeMillis();
&nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp; &nbsp;&nbsp;

&nbsp; &nbsp; private void jButton3MousePressed(java.awt.event.MouseEvent evt) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; terminarVazio();
&nbsp; &nbsp; &nbsp; &nbsp; tempoApertadoMi = System.currentTimeMillis();
&nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp; &nbsp;&nbsp;

&nbsp; &nbsp; private void jButton3MouseReleased(java.awt.event.MouseEvent evt) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; tempoSoltoMi = System.currentTimeMillis();
&nbsp; &nbsp; &nbsp; &nbsp; tempoTotalMi = tempoSoltoMi - tempoApertadoMi;
&nbsp; &nbsp; &nbsp; &nbsp; teclas[qtdElementos]= 3;
&nbsp; &nbsp; &nbsp; &nbsp; tempoPressionado[qtdElementos] = tempoTotalMi;
&nbsp; &nbsp; &nbsp; &nbsp; qtdElementos++;
&nbsp; &nbsp; &nbsp; &nbsp; qtdElementos = checarCheio(qtdElementos);
&nbsp; &nbsp; &nbsp; &nbsp; comecarVazio();
&nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;&nbsp;

&nbsp; &nbsp; private void jButton4MousePressed(java.awt.event.MouseEvent evt) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; terminarVazio();
&nbsp; &nbsp; &nbsp; &nbsp; tempoApertadoFa = System.currentTimeMillis();
&nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp; &nbsp;&nbsp;

&nbsp; &nbsp; private void jButton4MouseReleased(java.awt.event.MouseEvent evt) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; tempoSoltoFa = System.currentTimeMillis();
&nbsp; &nbsp; &nbsp; &nbsp; tempoTotalFa = tempoSoltoFa - tempoApertadoFa;
&nbsp; &nbsp; &nbsp; &nbsp; teclas[qtdElementos]= 4;
&nbsp; &nbsp; &nbsp; &nbsp; tempoPressionado[qtdElementos] = tempoTotalFa;
&nbsp; &nbsp; &nbsp; &nbsp; qtdElementos++;
&nbsp; &nbsp; &nbsp; &nbsp; qtdElementos = checarCheio(qtdElementos);
&nbsp; &nbsp; &nbsp; &nbsp; comecarVazio();
&nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;&nbsp;

&nbsp; &nbsp; private void jButton5MousePressed(java.awt.event.MouseEvent evt) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; terminarVazio();
&nbsp; &nbsp; &nbsp; &nbsp; tempoApertadoSol = System.currentTimeMillis();
&nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp; &nbsp;&nbsp;

&nbsp; &nbsp; private void jButton5MouseReleased(java.awt.event.MouseEvent evt) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; tempoSoltoSol = System.currentTimeMillis();
&nbsp; &nbsp; &nbsp; &nbsp; tempoTotalSol = tempoSoltoSol - tempoApertadoSol;
&nbsp; &nbsp; &nbsp; &nbsp; teclas[qtdElementos]= 5;
&nbsp; &nbsp; &nbsp; &nbsp; tempoPressionado[qtdElementos] = tempoTotalSol;
&nbsp; &nbsp; &nbsp; &nbsp; qtdElementos++;
&nbsp; &nbsp; &nbsp; &nbsp; qtdElementos = checarCheio(qtdElementos);
&nbsp; &nbsp; &nbsp; &nbsp; comecarVazio();
&nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;&nbsp;

&nbsp; &nbsp; private void jButton6MousePressed(java.awt.event.MouseEvent evt) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; terminarVazio();
&nbsp; &nbsp; &nbsp; &nbsp; tempoApertadoLa = System.currentTimeMillis();
&nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp; &nbsp;&nbsp;

&nbsp; &nbsp; private void jButton6MouseReleased(java.awt.event.MouseEvent evt) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; tempoSoltoLa = System.currentTimeMillis();
&nbsp; &nbsp; &nbsp; &nbsp; tempoTotalLa = tempoSoltoLa - tempoApertadoLa;
&nbsp; &nbsp; &nbsp; &nbsp; teclas[qtdElementos]= 6;
&nbsp; &nbsp; &nbsp; &nbsp; tempoPressionado[qtdElementos] = tempoTotalLa;
&nbsp; &nbsp; &nbsp; &nbsp; qtdElementos++;
&nbsp; &nbsp; &nbsp; &nbsp; qtdElementos = checarCheio(qtdElementos);
&nbsp; &nbsp; &nbsp; &nbsp; comecarVazio();
&nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;&nbsp;

&nbsp; &nbsp; private void jButton7MousePressed(java.awt.event.MouseEvent evt) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; terminarVazio();
&nbsp; &nbsp; &nbsp; &nbsp; tempoApertadoSi = System.currentTimeMillis();
&nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp; &nbsp;&nbsp;

&nbsp; &nbsp; private void jButton7MouseReleased(java.awt.event.MouseEvent evt) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; tempoSoltoSi = System.currentTimeMillis();
&nbsp; &nbsp; &nbsp; &nbsp; tempoTotalSi = tempoSoltoSi - tempoApertadoSi;
&nbsp; &nbsp; &nbsp; &nbsp; teclas[qtdElementos]= 7;
&nbsp; &nbsp; &nbsp; &nbsp; tempoPressionado[qtdElementos] = tempoTotalSi;
&nbsp; &nbsp; &nbsp; &nbsp; qtdElementos++;
&nbsp; &nbsp; &nbsp; &nbsp; qtdElementos = checarCheio(qtdElementos);
&nbsp; &nbsp; &nbsp; &nbsp; comecarVazio();
&nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;&nbsp;

&nbsp; &nbsp; public static void main(String args[]) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; try {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ("Nimbus".equals(info.getName())) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; javax.swing.UIManager.setLookAndFeel(info.getClassName());
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; } catch (ClassNotFoundException ex) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; java.util.logging.Logger.getLogger(Teclado.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
&nbsp; &nbsp; &nbsp; &nbsp; } catch (InstantiationException ex) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; java.util.logging.Logger.getLogger(Teclado.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
&nbsp; &nbsp; &nbsp; &nbsp; } catch (IllegalAccessException ex) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; java.util.logging.Logger.getLogger(Teclado.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
&nbsp; &nbsp; &nbsp; &nbsp; } catch (javax.swing.UnsupportedLookAndFeelException ex) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; java.util.logging.Logger.getLogger(Teclado.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; java.awt.EventQueue.invokeLater(new Runnable() {

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public void run() {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; new Teclado().setVisible(true);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; });
&nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp; &nbsp; private javax.swing.JButton jButton1;
&nbsp; &nbsp; private javax.swing.JButton jButton10;
&nbsp; &nbsp; private javax.swing.JButton jButton11;
&nbsp; &nbsp; private javax.swing.JButton jButton2;
&nbsp; &nbsp; private javax.swing.JButton jButton3;
&nbsp; &nbsp; private javax.swing.JButton jButton4;
&nbsp; &nbsp; private javax.swing.JButton jButton5;
&nbsp; &nbsp; private javax.swing.JButton jButton6;
&nbsp; &nbsp; private javax.swing.JButton jButton7;
&nbsp; &nbsp; private javax.swing.JButton jButton8; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
}