This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Suppressing borders on a TextArea

 
Gideon Goodwin
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 434
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
anybody?
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Gideon Goodwin
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the information.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic