Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 5052785
Votes 0
Synopsis Lack of clarity in description of the method setLineWrap(boolean wrap)
Category java:classes_swing
Reported Against 1.4.2
Release Fixed
State 3-Accepted, bug
Priority: 4-Low
Related Bugs
Submit Date 25-MAY-2004
Description


A DESCRIPTION OF THE PROBLEM :
This class in general has some clarity problems, specifically:

setLineWrap
public void setLineWrap(boolean wrap)Sets the line-wrapping policy of the text area. If set to true the lines will be wrapped if they are too long to fit within the allocated width.

It is unclear what the "allocated width" is.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
What exactly is meant by "allocated width."

URL OF FAULTY DOCUMENTATION :
http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JTextArea.html#setLineWrap(boolean)
(Incident Review ID: 275050) 
======================================================================
Posted Date : 2005-10-14 09:02:40.0
Work Around
N/A
Evaluation
  xxxxx@xxxxx   2004-06-01
Comments
  
  Include a link with my name & email   

Submitted On 03-APR-2007
I wonder if its possible to add a method setLineWidth(int lineWidth) to do this and use setLineWrap() as a switch.

The setLineWidth(int lineWidth) method would set the allocated witdth as number of columns. For example if you want to alloc further 10 cols then this method would be called as follows:

setLineWidth(10);

which will add 10 further cols.  


Submitted On 03-APR-2007
A note on setLineWidth(int lineWidth)

This method assumes that line width can be allocated dynamically. If so then it would also be reasonable to add a methode setLineHeight(int lineHeight) to add further rows to the textarea.

public void setLineWidth(int lineWidth);

public void setLineHeight(int lineHeight);



PLEASE NOTE: JDK6 is formerly known as Project Mustang