Skip to content

Commit

Permalink
8329559: Test javax/swing/JFrame/bug4419914.java failed because The E…
Browse files Browse the repository at this point in the history
…nd and Start buttons are not placed correctly and Tab focus does not move as expected

Backport-of: 7c1fad4fb6c387bbfb72b3f96b610e7cbc2ef312
  • Loading branch information
Andrew Lu committed Jul 9, 2024
1 parent 9c9a812 commit 9677a85
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions test/jdk/javax/swing/JFrame/bug4419914.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ public static void main(String[] args) throws Exception {
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();
Expand All @@ -65,11 +65,12 @@ private static JFrame createTestUI() {
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);
Expand Down

1 comment on commit 9677a85

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.