Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to draw an etched line?

 
Tris Rabar
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
I want to draw/place an etched line across a JFrame/JPanel. How do I go about doing this? (A line to separate stuff placed on the panel.)
Thanks for any assistance.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you need to be able to move the line around to resize the components on either side, you should use the JSplitPane class that comes with Swing. If you just need a line, you can use a JSeparator kinda like this :


-nate
 
Tris Rabar
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey, thanks a lot! It's the JSeparator I needed, not the JSplitPane.
Great help...thanks a million. Works wonderfully!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic