FileDocCategorySizeDatePackage
WindowsTextFieldUI.javaAPI DocJava SE 5 API5116Fri Aug 26 14:54:50 BST 2005com.sun.java.swing.plaf.windows

WindowsTextFieldUI

public class WindowsTextFieldUI extends BasicTextFieldUI
Provides the Windows look and feel for a text field. This is basically the following customizations to the default look-and-feel.
  • The border is beveled (using the standard control color).
  • The background is white by default.
  • The highlight color is a dark color, blue by default.
  • The foreground color is high contrast in the selected area, white by default. The unselected foreground is black.
  • The cursor blinks at about 1/2 second intervals.
  • The entire value is selected when focus is gained.
  • Shift-left-arrow and shift-right-arrow extend selection
  • Cntrl-left-arrow and cntrl-right-arrow act like home and end respectively.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

author
Timothy Prinzing
version
1.23 12/19/03

Fields Summary
Constructors Summary
Methods Summary
protected javax.swing.text.CaretcreateCaret()
Creates the caret for a field.

return
the caret

	return new WindowsFieldCaret();
    
public static javax.swing.plaf.ComponentUIcreateUI(javax.swing.JComponent c)
Creates a UI for a JTextField.

param
c the text field
return
the UI

        return new WindowsTextFieldUI();
    
protected voidpaintBackground(java.awt.Graphics g)
Paints a background for the view. This will only be called if isOpaque() on the associated component is true. The default is to paint the background color of the component.

param
g the graphics context

	super.paintBackground(g);