Pages

Friday, May 14, 2010

How to remove JTextArea line around rectangle (border)

 code:

textarea.setBorder(null);

In NetBeans:
1. Click the text area
2. Go to Properties
3. Scroll to Other Properties
4. Go to border then select (No Border)
5. Put this in your constructor:
jScrollPane1.setBorder(null);
This is because NetBeans automatically creates scrollpane to your text area and its border is visible until you set it to null.
6. Run the file to see the result.
It worked for me just fine :)

6 comments:

Anonymous said...

Yea this sucks in Netbeans. They should make something that you have a hierarchy list of all components. Because the problem is that you cannot select the JScrollPane to set the border of it to null.

jet MUSIC said...

Yeah I agree :)

huionn said...

"Because the problem is that you cannot select the JScrollPane to set the border of it to null."
Actually you can. It is in Navigator window. If you don't see it, then "CTRL + 7".

Anonymous said...

Supeeeer.... Thats working... thanks buddy

Anonymous said...

Thanks Thanks a lot

Anonymous said...

Your tip is still helping folks years later...

Thank you.

Post a Comment