JDK-4237560 : JScrollPane distorts TAB order
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.1.8
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 1999-05-12
  • Updated: 1999-06-24
  • Resolved: 1999-06-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.3.0 betaFixed
Related Reports
Relates :  
Description

Name: vi73552			Date: 05/12/99

=20
JEditorPane is place in JScrollPane and used to display HTML.
The HTML has a number of textfields some of which are out of
view. If you click on the first textfield and TAB you will move
to the next. Once the last visible one is reached the tabbing moves=20
to the next screen component - not the next textfield.

Example code

import java.awt.*;
import java.awt.event.*;
import java.net.*;
import javax.swing.*;


public class TabExample extends JFrame implements ActionListener
{JEditorPane        viewer;
 JButton            close_but;
=20

 public TabExample()
 {super("HTML TAB Problem");
=20
=20
  close_but =3D new JButton("Close");
  close_but.addActionListener(this);
 =20
  //////////////////////////////////////////////
  // Setup HTML Viewer and turn off annoying=20
  // white border
  ///////////////////////////////////////////////
 =20
  Insets insets =3D new Insets(0,0,0,0);
  viewer =3D new JEditorPane();
  viewer.setEditable(false); =20
  viewer.setBorder(new javax.swing.border.EmptyBorder(insets));
 =20
  getContentPane().setLayout(new BorderLayout());
  getContentPane().add(BorderLayout.CENTER,new JScrollPane(viewer));
  getContentPane().add(BorderLayout.SOUTH,close_but);
 =20
 }
 public void actionPerformed(ActionEvent evt)
 {setVisible(false);
 }


 ///////////////////////////////////////////////////////////
 // The launcher
 ///////////////////////////////////////////////////////////
=20
 public static void main (String args[])=20
 {URL url =3D ClassLoader.getSystemResource("custom.html");
 =09TabExample tab =3D new TabExample();
 =09
 =09tab.setBounds(0,0,400,300);
 =09tab.setVisible(true);
 =09
 =09try{tab.viewer.setPage(url);
 =09    }
 =09 catch (Exception exe)
    {
    }

 =09
 }

=20
=20
}

An HTML page

<!--=09IP Address Management System - Admin - add user page
=09(C) 1998 Jacobs Rimell Limited. All Rights Reserved.
 -->
<html>

<head>
<title></title>
</head>

<body BGCOLOR=3D"#8DBFC3" TEXT=3D"#FFFFFF">

<p align=3D"center"><font face=3D"Arial" color=3D"#FFFFFF"><strong>&nbsp;&n=
bsp;&nbsp;User
Details</strong></font></p>

<hr WIDTH=3D"420" ALIGN=3D"center">
<div align=3D"center"><center>

<table WIDTH=3D"400" BORDER=3D"0" CELLSPACING=3D"0">
  <tr>
    <td><small><font face=3D"Arial" color=3D"#FFFFFF">Please enter details:=
</font></small></td>
  </tr>
</table>
</center></div>

<form method=3D"POST" action=3D"%25APS_WEBDOMAIN%25/servlet/jradmin">
  <input type=3D"hidden" name=3D"postalCode" value=3D"EC2A 2AH"><input type=
=3D"hidden" name=3D"street"
  value=3D"28-30 Worship Street, London"><div align=3D"center"><center><tab=
le BORDER=3D"0"
  WIDTH=3D"400" CELLSPACING=3D"0">
    <tr>
      <td valign=3D"top" align=3D"left"><font face=3D"Arial" color=3D"#FFFF=
FF"><strong>Department:</strong></font></td>
      <td><font face=3D"Arial" color=3D"#FFFFFF"><strong><input TYPE=3D"tex=
t" NAME=3D"departmentNumber"
      VALUE=3D"@departmentNumber@" SIZE=3D"20"></strong></font></td>
    </tr>
    <tr>
      <td valign=3D"top" align=3D"left"></td>
      <td></td>
    </tr>
    <tr>
      <td valign=3D"top" align=3D"left"><font face=3D"Arial" color=3D"#FFFF=
FF"><strong>User ID:</strong></font></td>
      <td><font face=3D"Arial" color=3D"#FFFFFF"><strong><input TYPE=3D"tex=
t" NAME=3D"uid" VALUE=3D"@uid@"
      SIZE=3D"20"></strong></font></td>
    </tr>
    <tr>
      <td valign=3D"top" align=3D"left"><font face=3D"Arial" color=3D"#FFFF=
FF"><strong>First Name:</strong></font></td>
      <td><font face=3D"Arial" color=3D"#FFFFFF"><strong><input TYPE=3D"tex=
t" NAME=3D"cn" VALUE=3D"@cn@"
      SIZE=3D"20"></strong></font></td>
    </tr>
    <tr>
      <td valign=3D"top" align=3D"left"><font face=3D"Arial" color=3D"#FFFF=
FF"><strong>Surname:</strong></font></td>
      <td><font face=3D"Arial" color=3D"#FFFFFF"><strong><input TYPE=3D"tex=
t" NAME=3D"sn" VALUE=3D"@sn@"
      SIZE=3D"20"></strong></font></td>
    </tr>
    <tr>
      <td valign=3D"top" align=3D"left"><font face=3D"Arial" color=3D"#FFFF=
FF"><strong>Password:</strong></font></td>
      <td><font face=3D"Arial" color=3D"#FFFFFF"><strong><input TYPE=3D"pas=
sword" NAME=3D"userPassword"
      VALUE=3D"@userPassword@" SIZE=3D"20"></strong></font></td>
    </tr>
    <tr>
      <td valign=3D"top" align=3D"left"></td>
      <td></td>
    </tr>
    <tr>
      <td valign=3D"top" align=3D"left"><font face=3D"Arial"><strong>Prefer=
red Language:</strong></font></td>
      <td><select name=3D"preferredLanguage" size=3D"1">
     @preferredLanguage@ </select></td>
    </tr>
    <tr>
      <td valign=3D"top" align=3D"left"></td>
      <td></td>
    </tr>
    <tr>
      <td valign=3D"top" align=3D"left"><font face=3D"Arial" color=3D"#FFFF=
FF"><strong>Tel No:</strong></font></td>
      <td><font face=3D"Arial" color=3D"#FFFFFF"><strong><input TYPE=3D"tex=
t" NAME=3D"telephoneNumber"
      VALUE=3D"@telephoneNumber@" SIZE=3D"20"></strong></font></td>
    </tr>
    <tr>
      <td valign=3D"top" align=3D"left"><font face=3D"Arial" color=3D"#FFFF=
FF"><strong>Fax:</strong></font></td>
      <td><font face=3D"Arial" color=3D"#FFFFFF"><strong><input TYPE=3D"tex=
t"
      NAME=3D"facsimileTelephoneNumber" VALUE=3D"@facsimileTelephoneNumber@=
" SIZE=3D"20"></strong></font></td>
    </tr>
  =20
  </table>
  </center></div><div align=3D"center"><center><table BORDER=3D"0" WIDTH=3D=
"400" CELLSPACING=3D"0">
    <tr>
      <td ALIGN=3D"CENTER"><img src=3D"%25APS_WEBDOMAIN%25/APS/install/clie=
nt/jacobsrimell/logo.gif"
      width=3D"195" height=3D"69" alt=3D" " align=3D"top" hspace=3D"10" vsp=
ace=3D"10"></td>
    </tr>
  </table>
  </center></div>
</form>

<p><font face=3D"Arial" color=3D"#FFFFFF"><small>=A9 1998 Jacobs Rimell Lim=
ited. All Rights
Reserved.</small><strong> </strong></font></p>
</body>
</html>
(Review ID: 58107)=20
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: kestrel-beta FIXED IN: kestrel-beta INTEGRATED IN: kestrel-beta
14-06-2004

EVALUATION JEditorPane now overrides isFocusCycleRoot to return true. JEditorPane will also message the FocusManager to find the next focusable component if the JEditorPane isn't editable and has focus. scott.violet@eng 1999-05-24
24-05-1999

PUBLIC COMMENTS JEditorPane now overrides isFocusCycleRoot to return true. JEditorPane will also message the FocusManager to find the next focusable component if the JEditorPane isn't editable and has focus. scott.violet@eng 1999-05-24
24-05-1999