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

public class MainFrame 
extends JFrame {
	
	public MainFrame (String caption) {
		super (caption);
	}
	
	public void initFrame() {
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		this.setSize(100, 400);
		
		this.setBackground(Color.orange);
		
		this.getContentPane().setLayout(new BorderLayout());
		// this.getContentPane().add(new JLabel("Type here:")); 
		this.getContentPane().add(new JLabel("Type here:"), BorderLayout.NORTH);
		this.getContentPane().add(new JButton("Press me"), "South");
		
		// this.getContentPane().add(new JTextArea());
		
		// fix non-line wrapping
		JTextArea textArea = new JTextArea();
		textArea.setLineWrap(true);
		textArea.setWrapStyleWord(true);
		this.getContentPane().add(textArea); 
		
		this.setVisible(true);
	}
}
