There is no workaround for JDK-8324327

PavelTurk pavelturk2000 at gmail.com
Thu May 9 16:18:11 UTC 2024


Thank you for your answer and explanation.

As I understand the problem is not in using the type of the consructor, but in the initial color (from palette or not):

         ColorPicker picker = new ColorPicker();
         picker.setValue(Color.YELLOW);//this works OK, the color from palette
         picker.setValue(Color.CORAL);//this doesn't work, the color not from palette

Best regards, Pavel

On 5/9/24 6:18 PM, Andy Goryachev wrote:
>
> Perhaps I should have left a clearer note.  The bug is still there, no one worked on it yet.
>
> Changing to the default constructor at least works as expected - the large white square (selected color) appears over the right spot.  In the original example, the Color.CORAL is apparently not a part of the palette, so instead the white (incorrect) square appears at the wrong place.  Change the constructor argument to a color which is present in the palette and it would work as expected.  This is just a workaround, the bug is still there.
>
> -andy
>
> *From: *openjfx-dev <openjfx-dev-retn at openjdk.org> on behalf of PavelTurk <pavelturk2000 at gmail.com>
> *Date: *Thursday, May 9, 2024 at 07:56
> *To: *openjfx-dev at openjdk.org <openjfx-dev at openjdk.org>
> *Subject: *There is no workaround for JDK-8324327
>
> Hello all.
>
> This is about https://bugs.openjdk.org/browse/JDK-8324327 <https://bugs.openjdk.org/browse/JDK-8324327> .
>
> Andy Goryachev wrote in comment "Change to the default constructor and the issue disappears".
> I don't see that using default constructor solves the problem. I tried the following code :
>
> public class JavaFxTest7 extends Application {
>
>      public static void main(String[] args) {
>          launch(args);
>      }
>
>      @Override
>      public void start(Stage primaryStage) {
>          VBox root = new VBox();
>          ColorPicker picker = new ColorPicker();
>          root.getChildren().addAll(picker);
>
>          var scene = new Scene(root, 400, 300);
>          primaryStage.setScene(scene);
>          primaryStage.show();
>      }
> }
>
> and I have the same bug.
>
> JavaFX: 23-ea+3
> Java: 21.0.2
> OS: Ubuntu 20.04.3 LTS
>
> So, ColorPicker is always broken.
>
> Best regards, Pavel
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20240509/2d6091c1/attachment-0001.htm>


More information about the openjfx-dev mailing list