From 08784f18ea396cc7d7471e8a8603e02172ef6e20 Mon Sep 17 00:00:00 2001 From: Prasanta Sadhukhan Date: Wed, 22 Apr 2020 12:16:37 +0530 Subject: [PATCH] 8178028: Typing 'C' cannot change the tab layout to WRAP_TAB_LAYOUT Reviewed-by: jdv --- .../swing/JTabbedPane/4666224/bug4666224.java | 48 +++++++++++++------ 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/test/jdk/javax/swing/JTabbedPane/4666224/bug4666224.java b/test/jdk/javax/swing/JTabbedPane/4666224/bug4666224.java index d97600581bd..fe2085ac15f 100644 --- a/test/jdk/javax/swing/JTabbedPane/4666224/bug4666224.java +++ b/test/jdk/javax/swing/JTabbedPane/4666224/bug4666224.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -68,6 +68,24 @@ public class bug4666224 extends JApplet { panel = new JPanel(); panel.setPreferredSize(new Dimension(200, 300)); tabPane.addTab("Number Four", panel); + panel = new JPanel(); + panel.setPreferredSize(new Dimension(200, 300)); + tabPane.addTab("Number Five", panel); + panel = new JPanel(); + panel.setPreferredSize(new Dimension(200, 300)); + tabPane.addTab("Number Six", panel); + panel = new JPanel(); + panel.setPreferredSize(new Dimension(200, 300)); + tabPane.addTab("Number Seven", panel); + panel = new JPanel(); + panel.setPreferredSize(new Dimension(200, 300)); + tabPane.addTab("Number Eight", panel); + panel = new JPanel(); + panel.setPreferredSize(new Dimension(200, 300)); + tabPane.addTab("Number Nine", panel); + panel = new JPanel(); + panel.setPreferredSize(new Dimension(200, 300)); + tabPane.addTab("Number Ten", panel); mainPanel = new JPanel(); mainPanel.add(tabPane); @@ -97,6 +115,20 @@ public class bug4666224 extends JApplet { " If focus doesn't behave as above, ", " press 'Assertion Fail' else press 'Assertion Pass'", }, + { + " Note : Incase of Assertion failure,user can enter", + " remarks by pressing 'Assertion Fail Remarks ' button", + " ", + " You would see an applet with JTabbedPane. Keep the size of applet variable.", + " ", + " ON ALL PLATFORMS", + "1. type 'C' to change the tab layout to WRAP_TAB_LAYOUT ", + "2. Lose focus on the window by clicking on some other window ", + "3. Focus indicator should disappear", + "4. Regain focus on the window the focus indicator should reappear." , + " If focus doesn't behave as above, ", + " press 'Assertion Fail' else press 'Assertion Pass'", + }, { " Note : Incase of Assertion failure,user can enter", @@ -143,20 +175,6 @@ public class bug4666224 extends JApplet { " press 'Assertion Fail' else press 'Assertion Pass'", }, - { - " Note : Incase of Assertion failure,user can enter", - " remarks by pressing 'Assertion Fail Remarks ' button", - " ", - " You would see an applet with JTabbedPane. Keep the size of applet variable.", - " ", - " ON ALL PLATFORMS", - "1. type 'C' to change the tab layout to WRAP_TAB_LAYOUT ", - "2. Lose focus on the window by clicking on some other window ", - "3. Focus indicator should disappear", - "4. Regain focus on the window the focus indicator should reappear." , - " If focus doesn't behave as above, ", - " press 'Assertion Fail' else press 'Assertion Pass'", - }, { " Note : Incase of Assertion failure,user can enter",