0

I have the following line of code that consists of a text box:

    NameTextCustomers = new JTextField();
NameTextCustomers.setBounds(10, 10, 350, 150);
    Customers.add( NameTextCustomers);

I would like to align the text so it starts at the top left and it wraps within the box. Meaning the words don't disappear off screen, they continue to the next line. I'm not sure what or where to put additional code to accomplish this.

Thanks

javanna
  • 59,145
  • 14
  • 144
  • 125
Mike
  • 2,293
  • 13
  • 42
  • 56
  • Have you considered telling everyone which technology are you using in your problem? Everyone will appreciate that you correctly tag your question :) – Matías Fidemraizer Mar 18 '11 at 14:27

1 Answers1

7

You'll probably want to use a JTextArea rather than a JTextField. JTextFields are really meant for a single line of text.

Owen
  • 1,541
  • 1
  • 14
  • 12