8329559: Test javax/swing/JFrame/bug4419914.java failed because The End and Start buttons are not placed correctly and Tab focus does not move as expected

Reviewed-by: abhiscxk, honkar, dnguyen
This commit is contained in:
Prasanta Sadhukhan 2024-05-03 05:11:52 +00:00
parent 6bef0474c8
commit 7c1fad4fb6

View File

@ -53,8 +53,8 @@ public class bug4419914 {
PassFailJFrame.builder()
.title("Tab movement Instructions")
.instructions(INSTRUCTIONS)
.rows(12)
.columns(42)
.rows((int) INSTRUCTIONS.lines().count() + 2)
.columns(48)
.testUI(bug4419914::createTestUI)
.build()
.awaitAndCheck();
@ -65,11 +65,12 @@ public class bug4419914 {
frame.setFocusCycleRoot(true);
frame.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
frame.setLocale(Locale.ENGLISH);
frame.enableInputMethods(false);
frame.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
frame.setLocale(Locale.ENGLISH);
frame.setLayout(new BorderLayout());
frame.getContentPane().setComponentOrientation(
ComponentOrientation.RIGHT_TO_LEFT);
frame.getContentPane().setLocale(Locale.ENGLISH);
frame.getContentPane().setLayout(new BorderLayout());
frame.add(new JButton("SOUTH"), BorderLayout.SOUTH);
frame.add(new JButton("CENTER"), BorderLayout.CENTER);
frame.add(new JButton("END"), BorderLayout.LINE_END);