[Solved] Equivalent java code for this kotlin code? [closed]


Sorry this might be slightly off, but it’s the best that I can do with the amount of code that’s provided in Java 8 (and without actually reading through the provided Github repo):

private void showNoMoreCards() {
    showContent((layoutBuilder) -> {
        layoutBuilder.row((rowBuilder) -> {
            rowBuilder.label(LEFT_MARGIN, "Congratulations, you've reviewed all the cards for now!");
        });
    }); 
}

public void showContent(java.util.function.Consumer<LayoutBuilder> init) {
    JPanel panel = panel(LCFlags.fill, () -> {
        init.apply(layoutBuilder);
    });

    Content content = ContentFactory.SERVICE.getInstance().createContent(panel, "", false)
    toolWindow.getContentManager().removeAllContents(false);
    toolWindow.getContentManager().addContent(content);
}

solved Equivalent java code for this kotlin code? [closed]