Home pageFind It!Contact PJAPJA documentation

PJA

 PJA Toolkit forum

This forum is dedicated to PJA Toolkit.
You may read freely the messages it contents. If you want to write a message or answer to a subject, subscribe to it first.

Subjects Recent messages Login Subscribe

Messages of subject Error during JEditorPane.setText() on HP-UX

Thomas

Location : Karlsruhe / Germany
Member since : Aug 19, 2003
Messages : 1
 Aug 19, 2003 at 9:20 AM
Hello,

I am running JavaVM-1.3.0.01 on HP-UX B.11.00. The XLibraries are installed on the machine. When running the appended code, I get an error. What is wrong?

Best Regards, Thomas

Code:
// ----------------------------------------------------*
// CHANGE SYSTEM-PROPERTIES TO USE PJA:
// ----------------------------------------------------*/
System.setProperty ("awt.toolkit", "com.eteks.awt.PJAToolkit");
System.setProperty ("java.awt.graphicsenv", "com.eteks.java2d.PJAGraphicsEnvironment");
System.setProperty ("java.awt.fonts", System.getProperty("java.home") + "/lib/fonts");


// ----------------------------------------------------*
// START THE TESTS:
// ----------------------------------------------------*/
System.out.println("===========================================================");
System.out.println("Create color ...");
System.out.println("Color created: " + new Color (0,0,0));
System.out.println("-------------------");

System.out.println("Create JEditorPane ...");
System.out.println("JEditorPane created: " + new javax.swing.JEditorPane());
System.out.println("-------------------");

System.out.println("Fill Text into JEditorPane...");
new javax.swing.JEditorPane().setText("test");
System.out.println("Text filled into JEditorPane.");
System.out.println("===========================================================");


Command-Line-Options for Java:
java -classpath .:pja.jar:pjatools.jar:...
-Xbootclasspath/p:pja.jar
test

Output:
===========================================================
Create color ...
Color created: java.awt.Color[r=0,g=0,b=0]
-------------------
Create JEditorPane ...
JEditorPane created: javax.swing.JEditorPane[,0,0,0x0,invalid, layout=javax.swing.plaf.basic.BasicTextUI$UpdateHandler, alignmentX=null,alignmentY=null, border=javax.swing.plaf.basic.BasicBorders$MarginBorder@72ffb, flags=1184,maximumSize=,minimumSize=,preferredSize=, caretColor=javax.swing.plaf.ColorUIResource[r=0,g=0,b=0], disabledTextColor=javax.swing.plaf.ColorUIResource[r=153,g=153,b=153], editable=true,margin=javax.swing.plaf.InsetsUIResource[top=3,left=3,bottom=3,right=3], selectedTextColor=javax.swing.plaf.ColorUIResource[r=0,g=0,b=0], selectionColor=javax.swing.plaf.ColorUIResource[r=204,g=204,b=255], kit=javax.swing.JEditorPane$PlainEditorKit@52906a,typeHandlers=]
-------------------
Fill Text into JEditorPane...
Exception in thread "main" java.lang.ExceptionInInitializerError: java.lang.ClassCastException: com.eteks.awt.PJAToolkit
at sun.java2d.loops.RasterOutputManager.<clinit>(RasterOutputManager.java:253)
at java.awt.Component.getFontMetrics(Component.java:1935)
at javax.swing.text.WrappedPlainView.updateMetrics(WrappedPlainView.java:294)
at javax.swing.text.WrappedPlainView.updateChildren(WrappedPlainView.java:273)
at javax.swing.text.WrappedPlainView.insertUpdate(WrappedPlainView.java:436)
at javax.swing.plaf.basic.BasicTextUI$RootView.insertUpdate(BasicTextUI.java:1338)
at javax.swing.plaf.basic.BasicTextUI$UpdateHandler.insertUpdate(BasicTextUI.java:1562)
at javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:179)
at javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:543)
at javax.swing.text.DefaultEditorKit.read(DefaultEditorKit.java:217)
at javax.swing.JEditorPane.setText(JEditorPane.java:1237)
at test.lnfTest(test.java:153)
at test.<init>(test.java:72)
at test.main(test.java:58)

Manu

Location : Paris / France
Member since : Apr 29, 2003
Messages : 394
 Sep 9, 2003 at 8:52 AM
There are some problems when you try to use PJA with JDK 1.3.0 on HP-UX. Please update your JDK to a version >= 1.3.1.02 if you can.
---
Manu (moderator/modérateur)


Home pageFind It!ContactTop

© Copyrights 1997-2014 eTeks - All rights reserved

PJAPJA documentation