Guest User

Untitled

a guest
May 21st, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. String r1c1 = jTextField3.getText();
  2. String r1c2 = jTextField4.getText();
  3. String r1c3 = jTextField1.getText();
  4. String r1c4 = jTextField2.getText();
  5.  
  6. //r = row c = column
  7. for(int q = 0; q < 4; q++)
  8. {
  9. if(q == 0)
  10. {
  11. colors[0] [q] = r1c1;
  12. }
  13. if(q == 1)
  14. {
  15. colors[0] [q] = r1c2;
  16. }
  17. if(q == 2)
  18. {
  19. colors[0] [q] = r1c3;
  20. }
  21. if(q == 3)
  22. {
  23. colors[0] [q] = r1c4;
  24. }
  25. }
  26.  
  27. for(int i = 0; i < 4; i++){
  28. String s = "";
  29.  
  30. if(solution[i].equals(colors[0][i])){
  31.  
  32. //System.out.println("True");
  33. s = s+ "1";
  34.  
  35. jLabel2.setText(s);
  36.  
  37. }
  38. }
Add Comment
Please, Sign In to add comment