package org.panda_lang.pandomium.wrapper;

import org.cef.browser.CefBrowser;

import javax.swing.*;
import java.awt.*;

public class PandomiumBrowser {

    private final CefBrowser cefBrowser;

    public PandomiumBrowser(CefBrowser cefBrowser) {
        this.cefBrowser = cefBrowser;
    }

    public JPanel toSwingComponent() {
        JPanel panel = new JPanel();
        panel.add(toAWTComponent());
        return panel;
    }

    public Component toAWTComponent() {
        return cefBrowser.getUIComponent();
    }

    public CefBrowser getCefBrowser() {
        return cefBrowser;
    }

}

@@ -318,32 +318,88 @@
 ngComponent() %7B%0A
+        BorderLayout borderLayout = new BorderLayout();%0A
         JPanel p
@@ -416,19 +416,32 @@
  JPanel(
+borderLayout
 );%0A
+%0A
         
@@ -466,16 +466,37 @@
 ponent()
+, BorderLayout.CENTER
 );%0A     

Change a swing container layout to the border layout