| 116 | JPanel infoPanel = null; |
| 117 | |
| 118 | public Mainwindow() { |
| 119 | super(StringHelper.join("MUD Map ", Mainwindow.class.getPackage().getImplementationVersion())); |
| 120 | |
| 121 | setMinimumSize(new Dimension(400, 300)); |
| 122 | KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(this); |
| 123 | |
| 124 | final ClassLoader classLoader = Mainwindow.class.getClassLoader(); |
| 125 | final URL iconurl = classLoader.getResource("resources/mudmap-128.png"); |
| 126 | final ImageIcon iconimage = new ImageIcon(iconurl); |
| 127 | setIconImage(iconimage.getImage()); |
| 128 | |
| 129 | // create GUI |
| 130 | worldTabs = new HashMap<>(); |
| 131 | |
| 132 | setSize(900, 600); |
| 133 | setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); |
| 134 | addWindowListener(new WindowAdapter() { |
| 135 | @Override |
| 136 | public void windowClosing(final WindowEvent arg0) { |
| 137 | quit(); |
| 138 | } |
| 139 | }); |
| 140 | |
| 141 | initGui(); |
| 142 | } |
| 143 | |
| 144 | private ActionListener newWorldFileEntryActionListener(final WorldFileEntry entry) { |
| 145 | return new ActionListener() { |