public static void refreshLayout() { int gw = frame.getContentPane().getWidth() - CONST.popupwidth; int gh = frame.getContentPane().getHeight() - CONST.menuHeight - CONST.controlsHeight; System.out.println("refreshLayout " + gw + " " + gh); layeredPane.setBounds(0, 0, frame.getContentPane().getWidth(), gh + CONST.menuHeight); menu.setBounds(0, 0, frame.getContentPane().getWidth(), CONST.menuHeight); player.graph.canvas.setLocation(0, CONST.menuHeight); player.graph.resizeCanvas(gw, gh); controls.panel.setBounds( 0, gh + CONST.menuHeight, frame.getContentPane().getWidth(), CONST.controlsHeight); informationPanel.scrollPanel.setBounds( gw - CONST.informationWidth, CONST.menuHeight, CONST.informationWidth, gh - CONST.zoomWindowHeight); zoomWindow.canvas.setBounds( gw - CONST.zoomWindowWidth, CONST.menuHeight + gh - CONST.zoomWindowHeight, CONST.zoomWindowWidth, CONST.zoomWindowHeight); popupInformation.setBounds(gw, CONST.menuHeight, CONST.popupwidth, gh - CONST.zoomWindowHeight); popupZoomWindow.setBounds( gw, CONST.menuHeight + gh - CONST.zoomWindowHeight, CONST.popupwidth, CONST.zoomWindowHeight); controls.refresh(); if (fitGraph) { player.graph.fitToScreen(); fitGraph = false; } gRepaint(); }