+ bookPane = new JPanel(new WrapLayout(WrapLayout.LEADING, 5, 5));
+
+ color = null;
+ String bg = Instance.getUiConfig().getString(UiConfig.BACKGROUND_COLOR);
+ if (bg.startsWith("#") && bg.length() == 7) {
+ try {
+ color = new Color(Integer.parseInt(bg.substring(1, 3), 16),
+ Integer.parseInt(bg.substring(3, 5), 16),
+ Integer.parseInt(bg.substring(5, 7), 16));
+ } catch (NumberFormatException e) {
+ color = null; // no changes
+ e.printStackTrace();
+ }
+ }
+
+ if (color != null) {
+ setBackground(color);
+ bookPane.setBackground(color);
+ }