# Shrink back down a JPanel inserted as InlayComponent

**URL:** <https://platform.jetbrains.com/t/shrink-back-down-a-jpanel-inserted-as-inlaycomponent/1643>\
**Category:** IntelliJ Platform\
**Created:** [May 8, 2025, 6:14pm UTC](https://platform.jetbrains.com/t/shrink-back-down-a-jpanel-inserted-as-inlaycomponent/1643 "2025-05-08T18:14:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeremibg](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@jeremibg](https://platform.jetbrains.com/u/jeremibg)\
**Post date:** [May 8, 2025, 6:14pm UTC](https://platform.jetbrains.com/t/shrink-back-down-a-jpanel-inserted-as-inlaycomponent/1643/1 "2025-05-08T18:14:53Z")

</div>

We insert a JPanel above some selected code.  
What might be the reason it currently:

1. Properly expands to fill the entire screen when I increase the available space (e.g. reduce size of Project Tree View)
2. Does not shrink to fill the entire screen when I reduce the available space (e.g. increase size of Project Tree View)

---

<div class="post-metadata">

**Author:** ![jeremibg](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@jeremibg](https://platform.jetbrains.com/u/jeremibg)\
**Post date:** [May 13, 2025, 1:47am UTC](https://platform.jetbrains.com/t/shrink-back-down-a-jpanel-inserted-as-inlaycomponent/1643/2 "2025-05-13T01:47:20Z")

</div>

Turns out `wmin 0` as a MigLayout definition solves the issue.  
More info here:

> <https://stackoverflow.com/questions/2475787/miglayout-jtextarea-is-not-shrinking-when-used-with-linewrap-true/2739127#2739127>
