Skip to content

Commit

Permalink
8345618: javax/swing/text/Caret/8163124/CaretFloatingPointAPITest.jav…
Browse files Browse the repository at this point in the history
…a leaves Caret is not complete
  • Loading branch information
prsadhuk committed Jan 15, 2025
1 parent a0b7c4f commit 3db2019
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -222,11 +222,11 @@ public void paint(Graphics g) {

Graphics2D g2d = (Graphics2D) g;
g2d.draw(new Line2D.Float(c, cy, c, cy + ch));
g2d.draw(new Line2D.Float(cx, cy, cx + cw, cy));
g2d.draw(new Line2D.Float(cx, cy + ch, cx + cw, cy + ch));
}

void repaint(Rectangle r) {
r.width += 1;
r.height += 1;
component.repaint(r);
}

Expand Down Expand Up @@ -424,6 +424,8 @@ protected void adjustVisibility(Rectangle nloc) {

protected synchronized void damage(Rectangle r) {
if (r != null && component != null) {
r.width += 1;
r.height += 1;
component.repaint(r);
}
}
Expand Down

0 comments on commit 3db2019

Please sign in to comment.