Skip to content

Commit 7c1fad4

Browse files
committedMay 3, 2024
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
1 parent 6bef047 commit 7c1fad4

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed
 

‎test/jdk/javax/swing/JFrame/bug4419914.java

+7-6
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ public static void main(String[] args) throws Exception {
5353
PassFailJFrame.builder()
5454
.title("Tab movement Instructions")
5555
.instructions(INSTRUCTIONS)
56-
.rows(12)
57-
.columns(42)
56+
.rows((int) INSTRUCTIONS.lines().count() + 2)
57+
.columns(48)
5858
.testUI(bug4419914::createTestUI)
5959
.build()
6060
.awaitAndCheck();
@@ -65,11 +65,12 @@ private static JFrame createTestUI() {
6565
frame.setFocusCycleRoot(true);
6666
frame.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
6767
frame.setLocale(Locale.ENGLISH);
68-
6968
frame.enableInputMethods(false);
70-
frame.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
71-
frame.setLocale(Locale.ENGLISH);
72-
frame.setLayout(new BorderLayout());
69+
70+
frame.getContentPane().setComponentOrientation(
71+
ComponentOrientation.RIGHT_TO_LEFT);
72+
frame.getContentPane().setLocale(Locale.ENGLISH);
73+
frame.getContentPane().setLayout(new BorderLayout());
7374
frame.add(new JButton("SOUTH"), BorderLayout.SOUTH);
7475
frame.add(new JButton("CENTER"), BorderLayout.CENTER);
7576
frame.add(new JButton("END"), BorderLayout.LINE_END);

0 commit comments

Comments
 (0)
Failed to load comments.