netbeans is not well rendered using openjdk
Bug #289784 reported by
Nicolò Chieffo
This bug affects 8 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenJDK |
Fix Released
|
Medium
|
|||
netbeans (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Hardy |
Invalid
|
Undecided
|
Unassigned | ||
Intrepid |
Invalid
|
Undecided
|
Unassigned | ||
openjdk-6 (Ubuntu) |
Fix Released
|
Low
|
Unassigned | ||
Hardy |
Won't Fix
|
Low
|
Unassigned | ||
Intrepid |
Invalid
|
Low
|
Unassigned | ||
ttf-indic-fonts (Ubuntu) |
Confirmed
|
Medium
|
Unassigned | ||
Hardy |
Won't Fix
|
Undecided
|
Unassigned | ||
Intrepid |
Invalid
|
Undecided
|
Unassigned |
Bug Description
using openjdk 6b12-0ubuntu6
running netbeans 6.1, there are some problems with graphic. Maybe the problem is in rendering fonts.
Everything is bigger in comparison to sun java.
Even the UML editor has the same text problems for labels: the label text is not inside the field, as it should be, but under it.
screenshot for the example
Related branches
Changed in openjdk-6: | |
importance: | Undecided → Low |
status: | New → Triaged |
importance: | Undecided → Low |
status: | New → Triaged |
Changed in netbeans: | |
status: | New → Invalid |
status: | New → Invalid |
status: | New → Invalid |
Changed in openjdk: | |
status: | Unknown → Fix Released |
Changed in ttf-indic-fonts (Ubuntu): | |
importance: | Undecided → Medium |
status: | New → Confirmed |
Changed in ttf-indic-fonts (Ubuntu): | |
status: | Confirmed → Invalid |
Changed in ttf-indic-fonts (Ubuntu Hardy): | |
status: | New → Invalid |
Changed in ttf-indic-fonts (Ubuntu Intrepid): | |
status: | New → Invalid |
Changed in openjdk: | |
importance: | Unknown → Medium |
Changed in ttf-indic-fonts (Ubuntu Hardy): | |
status: | Confirmed → Won't Fix |
To post a comment you must log in.
The java.awt. font.TextLayout .getBounds( ) method returns a box that is shifted upwards compared to the box that is returned by Sun's official JRE.
Sample code:
package swingbug;
import java.awt.Color; Graphics2D; font.FontRender Context; font.TextLayout ; geom.Rectangle2 D;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.
import java.awt.Rectangle;
import java.awt.
import java.awt.
import java.awt.
import javax.swing.JFrame;
public class SwingBug extends JFrame {
private static final long serialVersionUID = 1L;
public static void main(String[] args) { ).setVisible( true); (Graphics2D) g; setColor( Color.BLUE) ; fillRect( 0,0,400, 400); graphics, "Hello Kitty!", 100, 100);
new SwingBug(
}
public SwingBug() {
setTitle("Swing bug");
setSize(400, 400);
repaint();
}
@Override
public void paint(Graphics g) {
Graphics2D graphics=
graphics.
graphics.
drawString(
}
public void drawString( setFont( f); ntext fontRendererContext = new FontRenderConte xt(null, true, true); text); =textLayout. getBounds( ); ngle=rectangleO fText.getBounds (); setColor( new Color(1. 0f,1.0f, 1.0f,0. 5f)); fillRect( backgroundRecta ngle.x+ x,backgroundRec tangle. y+y,backgroundR ectangle. width,backgroun dRectangle. height) ; setColor( new Color(0,0,0)); draw(graphics, x, y);
Graphics2D graphics, String string, int x, int y) {
if (string.length() > 0) {
Font f = new Font("times", 0, 16);
graphics.
FontRenderCo
TextLayout textLayout = new TextLayout(string, f, fontRendererCon
Rectangle2D rectangleOfText
Rectangle backgroundRecta
graphics.
graphics.
graphics.
textLayout.
}
}
}