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);

Politics is a circus designed to distract you from what is really going on. So is this tiny ad:
Rocket Oven Kickstarter - from the trailboss

This thread has been viewed 672 times.

All times above are in ranch (not your local) time.
The current ranch time is
Jul 22, 2018 14:34:32.