Forums Register Login
loading text area into a panel
pls,am having problems trying to put text area into JPanel.pls how can i do it.i did this and it didn't work.

JPanel p=new JPanel();
p.add(new JScrollPane(new JTextArea(50,50)));
javax.swing.JFrame frame = new javax.swing.JFrame("TEST");
java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();

javax.swing.JPanel p = new javax.swing.JPanel();
javax.swing.JTextArea tArea = new javax.swing.JTextArea(50,50);
p.add(new javax.swing.JScrollPane(tArea));



frame.setBounds((screenSize.width-600)/2, (screenSize.height-400)/2, 600, 400);

Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards

This thread has been viewed 644 times.

All times above are in ranch (not your local) time.
The current ranch time is
Mar 22, 2018 08:13:26.