On Fri, 15 Mar 2024 15:02:27 GMT, Alexey Ivanov <[email protected]> wrote:
>> I expected the label to be aligned to the left. For this to happen, the
>> label may need to wrapped into another panel or horizontal box with added
>> glue.
>>
>>
>>
>> Box logLabelBox = Box.createHorizontalBox();
>> logLabelBox.add(new JLabel("Log:"));
>> logLabelBox.add(Box.createHorizontalGlue());
>>
>> Box buttonsLogPanel = Box.createVerticalBox();
>> buttonsLogPanel.add(buttonsPanel);
>> buttonsLogPanel.add(logLabelBox);
>> buttonsLogPanel.add(new JScrollPane(logArea));
>>
>>
>> 
>>
>> Placeholder text isn't supported by Swing natively, is it? Therefore, you'll
>> have to remove the placeholder text when you add the first message, which
>> complicates logging a message.
>
> It could be obvious from the usage⦠so we may skip the header altogether⦠if
> it's mentioned in the instructions, which should still be mentioned to let
> the test know they need to look for the messages.
> Placeholder text isn't supported by Swing natively, is it? Therefore, you'll
> have to remove the placeholder text when you add the first message, which
> complicates logging a message.
It is not a big overhead, e.g. I already did it by slightly changing the
`log()` method. `logClear()` and `logSet()` are untouched.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18319#discussion_r1526451001