Advertisement
Guest User

letterList listen

a guest
Mar 6th, 2015
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.48 KB | None | 0 0
  1. listenTo(letterList.selection)
  2. reactions += {
  3.               case SelectionChanged(`letterList`) => {
  4.                 val x = letterList.selection.items(0).toString
  5.                 for(letter <- listLetters){
  6.                   val y = letter.asInstanceOf[Letter]
  7.                   if(x.compareTo(y.getLetter())==0){
  8.                     imagePanel.imagePath = y.getImage()
  9.                     url.text = y.getImage()
  10.                   }
  11.                 }
  12.               }
  13.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement