Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.awt.Container;
import java.awt.GridLayout;

import javax.swing.JFrame;
import javax.swing.JTextArea;

public class Main {
    public static void main(String args[]) {
        JFrame frame = new JFrame();
        Container content = frame.getContentPane();

        content.setLayout(new GridLayout(0, 2));

        JTextArea leftTextArea = new JTextArea();
        content.add(leftTextArea);
        leftTextArea.paste();

        frame.setSize(250, 150);
        frame.setVisible(true);
    }
}