I expect part of my frame contains the JTextArea but it occupies entirely. I cannot trace the error here.
import java.awt.*; import javax.swing.*; public cl
You can try using Absolute layout. It's on the Layouts Pallet.
Or enable it with :
frame = new JFrame(); ... //your code here // to set absolute layout. frame.getContentPane().setLayout(null);
This way, you can freely place the control anywhere you like.