Answer the question
In order to leave comments, you need to log in
How to define graphics borders on JPanel?
The swing library is used.
A horizontal JSplitPane is created in the frame . Added JScrollPane to
the left and right sides .
Added to the left JScrollPane, for example, a 2000x1500px image (the left side is not important). The scroll for the image is perfectly calculated by itself. A JPanel
element has been added to the right JScrollPane . Some kind of graphics will be added on this JPanel .
Frame sizes are fixed . I need to define the outermost borders of the JPanel , which is on the right side, to set the scroll area for the JScrollPane .
How can this be done other than defining these points each time a new graphic element is added?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question