Ticket #20003

javax.swing.text StyledDocument Does not display

Eröffnet am: 2009-12-25 18:32 Letztes Update: 2009-12-31 14:21

Auswertung:
Verantwortlicher:
Typ:
Status:
Offen [Owner assigned]
Komponente:
Meilenstein:
(Keine)
Priorität:
5 - Mittel
Schweregrad:
5 - Mittel
Lösung:
Accepted
Datei:
Keine

Details

javax.swing.text StyleDocument does not display text. The screen is blank on HTC Tilt2. Runs fine on computer. Same issue will all applications that use StyledDocuments.

Ticket-Verlauf (3/5 Historien)

2009-12-25 18:32 Aktualisiert von: bdwinsalt
  • New Ticket "javax.swing.text StyledDocument Does not display" created
2009-12-26 22:55 Aktualisiert von: freebeans
  • Lösung Update from Keine to Accepted
  • Verantwortlicher Update from (Keine) to freebeans
Kommentar

Thank you for your bug report. I'll investigate the cause of this problem. Would you send me a sample source to reproduce it, please?

2009-12-27 00:54 Aktualisiert von: freebeans
  • Priorität Update from 3 to 5 - Mittel
2009-12-27 04:40 Aktualisiert von: bdwinsalt
Kommentar

public static JTextPane chatText = null;

...

chatText = new JTextPane();

...

public static void append(Color c, String s) {
StyleContext sc = StyleContext.getDefaultStyleContext(); AttributeSet aset = sc.addAttribute(SimpleAttributeSet.EMPTY,
StyleConstants.Foreground, c);
int len = chatText.getDocument().getLength(); // same value as getText().length(); chatText.setCaretPosition(len); // place caret at the end (with no selection) chatText.setCharacterAttributes(aset, false);
chatText.setEditable(true); // Won't print text unless it's enabled
chatText.replaceSelection(s); // Adds the new line (with Color)
chatText.setEditable(false); // Disable so you can't backspace chat. }
2009-12-31 14:21 Aktualisiert von: freebeans
  • Meilenstein Update from jvm0.4.7 to (Keine)
Kommentar

Thank you. I can reproduce the problem with your code, and I found a bug in JVM. (Bug #20056) I'll fix it.

Dateianhangliste

Keine Anhänge

Bearbeiten

Please login to add comment to this ticket » Anmelden