tags:

views:

38

answers:

2

is any body knows a code to make a java text frame.,,please i need help

+1  A: 

Your question is lacking but...

JFrame frame = new JFrame();
Container cp = frame.getContentPane();
cp.add(new JTextArea());
frame.pack();
frame.setVisible(true);

^ would be the simplest example.

JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Container cp = frame.getContentPane();
JTextArea txt = new JTextArea();
JScrollPane scroll = new JScrollPane(txt);
scroll.setPreferredSize(new Dimension(200, 200));
cp.add(scroll);
frame.pack();
frame.setVisible(true);

^ enables scrolling

pstanton
A: 
JTextField tf = new JTextField("Should Do your homework first");

JTextArea ta = new JTextArea("Is this homework, \n the queestion is not clear");
Suraj Chandran
ease up, he's a stoner.
pstanton
:)...that was to be taken in good will in a lighter vien :)
Suraj Chandran