implemented event handler for ApplicationFrame's mapselecting
This commit is contained in:
parent
e25cc615cd
commit
ccff798960
@ -26,7 +26,9 @@ public class ApplicationFrame implements Runnable
|
||||
private class ListMouseHandler extends MouseAdapter{
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent e) {
|
||||
JOptionPane.showMessageDialog(null, ((JList<File>)e.getComponent()).getSelectedValue().toString());
|
||||
jframe.remove(mapselectorpanel);
|
||||
jframe.add(gamepanel);
|
||||
jframe.revalidate();
|
||||
}
|
||||
}
|
||||
|
||||
@ -52,10 +54,11 @@ public class ApplicationFrame implements Runnable
|
||||
filelist.addMouseListener(new ListMouseHandler());
|
||||
|
||||
mapselectorpanel.add(filelist);
|
||||
gamepanel = new JPanel();
|
||||
|
||||
jframe.add(mapselectorpanel);
|
||||
|
||||
//TODO rewrite demo ListMouseHandler and do Game stuff...
|
||||
// TODO add Ejik's magic to gamepanel
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user