package eg.ui;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JButton;
import java.awt.FlowLayout;
import java.awt.GridLayout;
import java.awt.BorderLayout;
import java.awt.Color;

import javax.swing.border.Border;
import javax.swing.border.EmptyBorder;

/**
 * The window that shows info about Eadgyth
 */
public class InfoWin {

   private final static String INFO
         = "<html>"
         + "Version to test since 1.0.6.3<br>"
         + "Malte Bussiek<br>"
         + "https://eadgyth.github.io/Programming-Editor"
         + "</html>";
         
   private final static Border EMPTY_BORDER = new EmptyBorder(5, 5, 5, 5);

   private final JFrame  frame    = new JFrame();
   private final JPanel  okButton = new JPanel(new FlowLayout());
   private final JPanel  text     = new JPanel(new GridLayout(2, 1));
   private final JPanel  combine  = new JPanel(new BorderLayout());
   private final JButton okBt     = new JButton("OK");
   private final JLabel  titleLb  = new JLabel("Eadgyth Programming-Editor");
   private final JLabel  infoLb   = new JLabel(INFO);

   public InfoWin() {  
      titleLb.setFont(Fonts.SANSSERIF_BOLD_11);
      infoLb.setFont(Fonts.SANSSERIF_PLAIN_9);
      okBt.setFocusPainted(false);
      okBt.addActionListener(e -> frame.setVisible(false));
      okButton.add(okBt);     
      text.setBackground(Color.white);
      text.setBorder(EMPTY_BORDER);
      text.add(titleLb);
      text.add(infoLb);

      combine.setBorder(EMPTY_BORDER);
      combine.add(text, BorderLayout.CENTER);
      combine.add(okButton, BorderLayout.SOUTH);
            
      frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
      frame.setIconImage(IconFiles.EADGYTH_ICON_16.getImage());
      frame.setLocation(650, 100);
      frame.setTitle("About");
      frame.setContentPane(combine);
      frame.setResizable(false);
      frame.setSize(eg.utils.ScreenParams.scaledDimension(300, 150));
      frame.setVisible(true);
   }
}

@@ -458,29 +458,13 @@
 ion 
-to test since 
 1.0.
-6.3
+7
 %3Cbr%3E
@@ -652,18 +652,22 @@
 der(
-5, 5, 5, 5
+10, 10, 10, 10
 );%0A%0A
@@ -741,24 +741,24 @@
 JPanel  
-okButton
+textPnl 
  = new J
@@ -767,24 +767,8 @@
 nel(
-new FlowLayout()
 );%0A 
@@ -795,50 +795,53 @@
 el  
-text     = new JPanel(new GridLayout(2, 1)
+holdTextPnl = UIComponents.grayBorderedPanel(
 );%0A 
@@ -911,63 +911,8 @@
 ));%0A
-   private final JButton okBt     = new JButton(%22OK%22);%0A
    p
@@ -1038,16 +1038,137 @@
 l(INFO);
+%0A   private final JPanel  okButton = new JPanel(new FlowLayout());%0A   private final JButton okBt     = new JButton(%22OK%22);
 %0A%0A   pub
@@ -1400,21 +1400,63 @@
 d(okBt);
+%0A
      
+ textPnl.setLayout(new GridLayout(2, 1));
 %0A      t
@@ -1454,24 +1454,27 @@
 ;%0A      text
+Pnl
 .setBackgrou
@@ -1500,39 +1500,31 @@
     text
-.setBorder(EMPTY_BORDER
+Pnl.add(titleLb
 );%0A     
@@ -1528,26 +1528,28 @@
     text
+Pnl
 .add(
-title
+info
 Lb);%0A   
@@ -1555,26 +1555,79 @@
     
-text.add(infoLb);%0A
+holdTextPnl.add(textPnl);%0A      holdTextPnl.setBackground(Color.white);
 %0A   
@@ -1680,20 +1680,27 @@
 ine.add(
-text
+holdTextPnl
 , Border
@@ -2102,10 +2102,10 @@
 ion(
-30
+25
 0, 1

change layout a little