On Fri, 20 May 2022 12:02:42 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:
>> Right, JPanel isn't laid out without being added to a peered component. >> >> Maybe setting explicit positions to child panels will work, then the test >> can be headless. > >> That looks odd. I mean if you show the frame, how is it disposed ? > > The idea for that is that frame is shown only if `-show` parameter is passed. > In this case, it's assumed the user runs the test from the IDE or on command > line. So the frame is disposed of when the user closes it. > > Perhaps you are trying to get layout to happen ? That should be possible > > but it might be tricky. > > Right, JPanel isn't laid out without being added to a peered component. > > Maybe setting explicit positions to child panels will work, then the test can > be headless. Indeed, it works with explicitly set size and positions. Here's [a working sample](https://github.com/alisenchung/jdk/compare/8279614...aivanov-jdk:alisen-8279614-titledBorder). (Add `.diff` or `.patch` to the URL to get the changeset to apply.) ------------- PR: https://git.openjdk.java.net/jdk/pull/7449