On Fri, 15 Mar 2024 15:02:27 GMT, Alexey Ivanov <aiva...@openjdk.org> 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)); >> >> >> ![Log Area with the "Log:" header, screenshot of >> PassFailJFrame](https://github.com/openjdk/jdk/assets/70774172/69a86152-a8a6-45ec-9a66-a457f4f5e396) >> >> 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