This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Borders for my JTextAreas :o  RSS feed

 
Mike Smike
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey buddies,

How do you go about creating a visible line border around a JTextArea? I know there is a setBorder() method but that takes a Graphics component as an argument, and I can't see a method in the Graphics class that constructs a simple line unless two coords are specified! Surely there is an easier way to draw a line around my JTextAreas?

Currently I have 100 in a grid, each containing information, and it looks a bit messy without anything to visible seperate them!

Hope someone can help

Thanks

Mike
 
Don Kiddick
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know there is a setBorder() method but that takes a Graphics component as an argument


It doesn't in my javadocs. setBorder should do the trick eg

 
Mike Smike
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you muchos mister!! You've made my day



Mike
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!