S
S
Sergey2014-09-18 15:31:05
Java
Sergey, 2014-09-18 15:31:05

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?

cc4a928fa366408986acc6330b9045be.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question