aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Suppressing borders on a TextArea Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Suppressing borders on a TextArea" Watch "Suppressing borders on a TextArea" New topic
Author

Suppressing borders on a TextArea

Gideon Goodwin
Greenhorn

Joined: Dec 10, 2004
Posts: 13
Hello, hopefully this should be an easy question to answer:

I have added a TextArea to a custom Panel subclass and I would like it to display its text contents without drawing standard AWT borders. I looked at the API and couldn't find any suitable methods for supressing border-draw in either the TextArea, TextComponent, or Component classes. What is the easiest way to accomplish this? Even if I could set the border to a fixed color to match my background color...

Thanks in advance.
Rachel Swailes
Ranch Hand

Joined: May 18, 2004
Posts: 434
Hi there

If you were using swing components, you can use
myComponent.setBorder(BorderFactory.createEmptyBorder()) which would blank out the border.

Are AWT components a requirement?

Cheers,
Rachel
[ April 06, 2005: Message edited by: Rachel Swailes ]
Gideon Goodwin
Greenhorn

Joined: Dec 10, 2004
Posts: 13
Thanks for the reply.

We had been hoping to avoid Swing components because we are still trying to target Java2 without the swing extension. So can I infer from your post that it is not possible to supress borders on AWT TextAreas? If so, I can look for another solution.

Thanks again.
Gideon Goodwin
Greenhorn

Joined: Dec 10, 2004
Posts: 13
anybody?
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

Well, with AWT the problem becomes what is supported by the OS. When you draw a textarea with AWT you are just requesting the native OS to display it's TextArea widget. So I would say you are out of luck.


GenRocket - A Test Data Generation Platform
Gideon Goodwin
Greenhorn

Joined: Dec 10, 2004
Posts: 13
Thanks for the information.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Suppressing borders on a TextArea
 
Similar Threads
Text Fields and Text Areas of Web Page Have Hard Coded Colors
CSS : Cell borders showing up on th cells but not td
Button.setBorder()
jTextField default border color
Text Area border transparent