Skip to content

Commit

Permalink
added random to it possibly
Browse files Browse the repository at this point in the history
  • Loading branch information
bgenidy committed Sep 28, 2014
1 parent e8620a5 commit 5ec90a5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions leapmotion/Gui.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,30 @@
import javax.swing.JLabel;
import javax.swing.SwingConstants;
import com.leapmotion.leap.*;
import java.lang.Math.*;

public class Gui extends JFrame {

static Controller control = new Controller();

public static void main (String [] args){
createWindow();


}

private static void createWindow() {
int charRange = (int)(97 + (Math.random() * 123));
char ch = (char) charRange;
JFrame frame = new JFrame("Sign Language Learning");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JLabel textLabel = new JLabel("I'm a label in the window",SwingConstants.CENTER);
JLabel textLabel = new JLabel(ch,SwingConstants.CENTER);
frame.addKeyListener(new KeyListener(){


public void keyTyped(KeyEvent e) {
com.leapmotion.leap.Frame frame = control.frame();
com.leapmotion.leap.Frame lmframe = control.frame();
checkAnswer(lmframe, ch);
// TODO adding frame=controllerFrame();
// checkAns(frame, letter);
//checkans should return boolean, if true, change color of border to green
Expand Down

0 comments on commit 5ec90a5

Please sign in to comment.