Meaningless Drivel is fun!
The moose likes Swing / AWT / SWT and the fly likes creating a margin in swing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "creating a margin in swing" Watch "creating a margin in swing" New topic

creating a margin in swing

Rakesh Keerthi
Ranch Hand

Joined: Jul 16, 2012
Posts: 149

I've the below code for opening and viewing a PDF document in java swing, but here i need an additional component to create a border to check if the content is going inside the margin or out of margin, the margin should be on both the sides. please let me know how i can get it.

Sam Gooding
Ranch Hand

Joined: Dec 06, 2013
Posts: 35
Trying to understand what you want. You want a border around the PDF component. You want that border to be the same on both sides. You also want that border (or something) to detect if and when the text of the PDF document crosses that border, effectively turning the border into a margin for the document. Is that it?
Rakesh Keerthi
Ranch Hand

Joined: Jul 16, 2012
Posts: 149
Hi Sam,

I've fixed the code. Thank you very much for looking into this post. but I've encountered another problem i'll be posting it as a new question Thanks again.

The code i wrote is

I agree. Here's the link:
subject: creating a margin in swing
It's not a secret anymore!