-
Bug
-
Resolution: Fixed
-
P4
-
1.1.8
-
beta
-
generic
-
generic
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> &n=
bsp; 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
======================================================================
- relates to
-
JDK-5045914 TEST_BUG & 1.5 REGRESSION: Test javax/swing/JScrollPane/4237560/bug4237560.java
-
- Resolved
-