Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. CO-1, hard coding values does not support your requirement for dynamic resizing. `none of them worked for me.` - I posted a working example. Is the image not centered in the frame? Is the red panel not centered on the image? How did it NOT work for you? The code I gave you works for a tile panel that uses a null layout. How does that not satisfy your requirement? Take the time to understand the solution. If the example I posted does not reflect the structure of your frame, then where is the code that reflects your structure. That is what a `SSCCE` is for.
      singulars
    2. COIt definitely is dynamically resizing. I told you my exact requirements: fixed middle panel that always stays centered while the frame dynamically resizes. I cannot change my requirements, so -1 me for that is absurd. I solved the problem without using your suggestions, unfortunately, as I spent a couple hours trying each one, but they didn't work in the end.
      singulars
    3. COThe code I gave you works as is. Everything is centered. All you need to do is add some components to the "tiles" panel and adjust the preferred size. `didn't work in the end` - this doesn't describe the problem. What doesn't work? You made a change and broke the code. How do you expect help when you don't describe the problem? Using a BoxLayout is not a bad solution. It is the second most common way to center components. Using the GridBagLayout is just easier because you don't need to worry about the glue. If BoxLayout works, then GridBagLayout should as well.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload