diff --git a/cicaprojekt/ApplicationFrame.java b/cicaprojekt/ApplicationFrame.java index 62168ca..fd25f86 100644 --- a/cicaprojekt/ApplicationFrame.java +++ b/cicaprojekt/ApplicationFrame.java @@ -26,7 +26,9 @@ public class ApplicationFrame implements Runnable private class ListMouseHandler extends MouseAdapter{ @Override public void mouseClicked(MouseEvent e) { - JOptionPane.showMessageDialog(null, ((JList)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