JTextArea texA; JScrollPane scroll; TextEdit(String name){ super(name); init(); } void init(){ this.setBounds(100,100,600,400); JPanel pan = new JPanel(); pan.setLayout(new FlowLayout(FlowLayout.CENTER)); pan.setBackground(Color.YELLOW); texA = new JTextArea("34reterte35",20,30); scroll = new JScrollPane(texA); pan.add(scroll); this.add(pan); }