-
-
Notifications
You must be signed in to change notification settings - Fork 939
Problem inheriting LayoutFocusTraversalPolicy and other Swing classes with Java 17 #7220
Description
Environment Information
JRuby versions tested: 9.2.20.1, 9.3.4.0
Java version: openjdk version "17.0.3" 2022-04-19
System: Linux bree 5.17.0-1-amd64 #1 SMP PREEMPT Debian 5.17.3-1 (2022-04-18) x86_64 GNU/Linux
Expected Behavior
I am trying to inherit LayoutFocusTraversalPolicy class from Java. This has worked until now with Java 8. I include a little script for reproducing the problem. Expected behaviour is that when yo use tab to change focus between components, all works.
Actual Behavior
The reality is worse. When using tab to change focus I get an error:
Exception in thread "AWT-EventQueue-0" org.jruby.exceptions.NoMethodError: (NoMethodError) super: no superclass method `accept' for #<FocusTraversalManager:0x1de5cc88 @potential_searching=false> at coso.accept(coso.rb:38)
As I said before, with Java 8 this code works well and it seems that should work in any case.