View Single Post
Old 12-29-2011, 04:59 PM   PM User | #3
Scriptr
Regular Coder

 
Join Date: Oct 2011
Posts: 106
Thanks: 12
Thanked 0 Times in 0 Posts
Scriptr is an unknown quantity at this point
But......

Why, then when I do
Code:
JFrame.setDefaultLookAndFeelDecorated(true);
	JFrame frame = new JFrame("Hosts Editor");
	frame.setLayout(new FlowLayout());
	JTextField jtf = new JTextField("");
	JButton submit = new JButton("Submit Addresses");
.........
Code:
frame.add(jtf);
	submit.addActionListener(new HC(s));
frame.add(submit);
frame.setVisible(true);
frame.pack();
it returns a barely-visible vertical line in which to type (expected, as I have no width arguments; works perfectly if I put arguments), but if I replace JTextField with JTextArea in all instances, it returns just the button; no text field or area at all.

Last edited by Scriptr; 12-29-2011 at 05:28 PM..
Scriptr is offline   Reply With Quote