setIconImage(Images.loadImage("icon.png"));
ControlPanel controlPanel = new ControlPanel();
StatusBar statusBar = new StatusBar();
playlistPanel = new PlaylistPanel();
LyricsPanel lyricsPanel = new LyricsPanel();
LibraryView libraryView = new LibraryView();
JTabbedPane topLeftSide = new JTabbedPane();
topLeftSide.add("Library", libraryView);
topLeftSide.add("Lyrics", lyricsPanel);
topLeftSide.setFocusable(false);
side = new JSplitPane(JSplitPane.VERTICAL_SPLIT, topLeftSide, new AlbumArtPanel());
side.setDividerSize(6);
center = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, side, playlistPanel);
int sideBarWidth = config.getInt("sidebar.width", 300);
center.setDividerLocation(sideBarWidth);
int sideBarSeparator = config.getInt("sidebar.divider", 400);
side.setDividerLocation(sideBarSeparator);
JMenuBar menuBar = new JMenuBar();
setJMenuBar(menuBar);
add(controlPanel, BorderLayout.NORTH);
add(statusBar, BorderLayout.SOUTH);
add(center, BorderLayout.CENTER);
playlistPanel.addMenu(menuBar);
libraryView.addMenu(menuBar);
addHelpMenu(menuBar);
setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
Rectangle r = config.getRectangle("gui.mainWindowPosition", new Rectangle(50, 0, 1000, 730));
setLocation((int) r.getX(), (int) r.getY());