JDK-4138573 : FontMetrics problem getting values from g2.getFontMetrics()
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 1.2.0
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_2.6
  • CPU: sparc
  • Submitted: 1998-05-14
  • Updated: 1998-05-15
  • Resolved: 1998-05-15
Related Reports
Duplicate :  
Description
Run the Java2D demo located in /usr/local/java/jdk1.2/solaris/demo/jfc/Java2D.  Take a look at the Memory Monitor and Performance Monitor canvases.

PerformanceMonitor strings are not positioned appropriately.  And the MemoryMonitor memory graph isn't positioned correctly.   Here's how the ascent's & descent's are determined :

MemoryMonitor :
   ascent = (int) offG.getFontMetrics(font).getAscent();
   descent = (int) offG.getFontMetrics(font).getDescent();

PerfomanceMonitor :
    ssH += (int) offG.getFontMetrics().getAscent()
                   + offG.getFontMetrics().getDescent();


"JDK-1.2beta4-F"

Comments
WORK AROUND Work around run a local copy of the demo.
11-06-2004