aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes How to draw an etched line? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to draw an etched line?" Watch "How to draw an etched line?" New topic
Author

How to draw an etched line?

Tris Rabar
Ranch Hand

Joined: Feb 27, 2002
Posts: 72
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.


- Trish -
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

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


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Tris Rabar
Ranch Hand

Joined: Feb 27, 2002
Posts: 72
Hey, thanks a lot! It's the JSeparator I needed, not the JSplitPane.
Great help...thanks a million. Works wonderfully!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to draw an etched line?