jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java
changeset 30926 59dd8fec081b
parent 30925 82638cf1cd30
child 31884 15ece91df8e9
equal deleted inserted replaced
30925:82638cf1cd30 30926:59dd8fec081b
   934 
   934 
   935         if (doc instanceof AbstractDocument) {
   935         if (doc instanceof AbstractDocument) {
   936             ((AbstractDocument)doc).readLock();
   936             ((AbstractDocument)doc).readLock();
   937         }
   937         }
   938         try {
   938         try {
   939             if ((d.width > (i.left + i.right)) && (d.height > (i.top + i.bottom))) {
   939             if ((d.width > (i.left + i.right + caretMargin)) && (d.height > (i.top + i.bottom))) {
   940                 rootView.setSize(d.width - i.left - i.right, d.height - i.top - i.bottom);
   940                 rootView.setSize(d.width - i.left - i.right -
       
   941                         caretMargin, d.height - i.top - i.bottom);
   941             }
   942             }
   942             else if (d.width == 0 || d.height == 0) {
   943             else if (d.width == 0 || d.height == 0) {
   943                 // Probably haven't been layed out yet, force some sort of
   944                 // Probably haven't been layed out yet, force some sort of
   944                 // initial sizing.
   945                 // initial sizing.
   945                 rootView.setSize(Integer.MAX_VALUE, Integer.MAX_VALUE);
   946                 rootView.setSize(Integer.MAX_VALUE, Integer.MAX_VALUE);