To make things easier, I've created a figure below of what I want:
Basically, the panel on the left displays an image and the panel on the right will display a colorbar. I've already got two panel classes that display the image and colorbar how I want, but now I want to put them side by side inside a JFrame
. Now, I'm not exactly sure what the best implementation would be for this so if anyone has any conceptually different ideas then they would be appreciated.
I've already tried a GridLayout
, but it seemed to position things in terms of percentages. The one tricky thing about this is that I'd like the panel on the right to be a fixed width because I don't want the colorbar to change widths as the frame is resized.