jdk/src/share/classes/com/sun/java/swing/plaf/windows/WindowsProgressBarUI.java
changeset 11807 cb8e532bd996
parent 5506 202f599c92aa
child 23010 6dadb192ad81
equal deleted inserted replaced
11806:38e5838650a6 11807:cb8e532bd996
   135                 // Do not paint the standard stripes from the skin, because they obscure
   135                 // Do not paint the standard stripes from the skin, because they obscure
   136                 // the text
   136                 // the text
   137                 g.setColor(progressBar.getForeground());
   137                 g.setColor(progressBar.getForeground());
   138                 barRectHeight -= 2;
   138                 barRectHeight -= 2;
   139                 barRectWidth -= 2;
   139                 barRectWidth -= 2;
       
   140 
       
   141                 if (barRectWidth <= 0 || barRectHeight <= 0) {
       
   142                     return;
       
   143                 }
       
   144 
   140                 Graphics2D g2 = (Graphics2D)g;
   145                 Graphics2D g2 = (Graphics2D)g;
   141                 g2.setStroke(new BasicStroke((float)(vertical ? barRectWidth : barRectHeight),
   146                 g2.setStroke(new BasicStroke((float)(vertical ? barRectWidth : barRectHeight),
   142                                              BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL));
   147                                              BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL));
   143                 if (!vertical) {
   148                 if (!vertical) {
   144                     if (isLeftToRight) {
   149                     if (isLeftToRight) {