protected void drawToolTipOutline( DrawContext dc, double width, double height, ToolTipAttributes attributes) { GL2 gl = dc.getGL().getGL2(); // GL initialization checks for GL2 compatibility. this.applyColor(dc, attributes.getOutlineColor(), attributes.getOutlineOpacity()); gl.glLineWidth((float) getOutlineWidth()); // Draw a line loop around the background rectangle. Inset the lines slightly to compensate for // OpenGL's line // rasterization algorithm. We want the line to straddle the rectangle pixels. double inset = 0.5; gl.glBegin(GL2.GL_LINE_LOOP); gl.glVertex2d(inset, inset); gl.glVertex2d(width - inset, inset); gl.glVertex2d(width - inset, height - inset); gl.glVertex2d(inset, height - inset); gl.glEnd(); }