On Fri, Jan 21, 2000 at 10:52:52PM -0000, Alistair Bayley wrote:
> Peter, it looks like I have the same build as you.
> Running as root makes no difference (as expected).
> I've tried messing around with CLASSPATH etc to no effect.
> Here's my test program; it produces diffeent output from before
> but the point is made. I think there's a problem with the
> Pluggable L+F code.
The AWT doesn't work with all X server depths and visuals... especially
those not found on Solaris. In the past, many people have reported success
by playing with some of the X server startup settings. You may want to
browse past mail on the topic, or look at chapter 56 of "Java Programming
on Linux." I think the situation is supposed to be improving in future
JDK releases.
> What's more annoying is that it appears as though not all of
> the source code is distributed (I've unpacked the src.jar file).
> I can't find the sun.awt classes; I guess we're not meant to view them.
Not without signing the Sun Community Source License. Any notion that
the JDK is open source will be quickly cured by reading the license :-).
Nathan Meyers
[EMAIL PROTECTED]
http://www.javalinux.net
>
>
> ==================== SwingTest.java:
> import javax.swing.*;
>
> public class SwingTest {
> public static void main(String[] args) {
> try {
>
>UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
> } catch (Exception e) { e.printStackTrace(); }
> JFrame frame = new JFrame("SwingTest");
> frame.setVisible(true);
> }
> }
>
>
> ==================== output:
> Font specified in font.properties not found
>[--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
> ...
> java.lang.IllegalArgumentException: Raster IntegerInterleavedRaster: width = 64
>height = 64 #Bands = 3 #DataElements 1 xOff = 0 yOff
> = 0 dataOffset[0] 0 is incompatible with ColorModel DirectColorModel: rmask=ff0000
>gmask=ff00 bmask=ff amask=0
> at java.awt.image.BufferedImage.<init>(BufferedImage.java:521)
> at sun.awt.image.OffScreenImage.<init>(OffScreenImage.java:70)
> at sun.awt.motif.MComponentPeer.createImage(MComponentPeer.java:310)
> at java.awt.Component.createImage(Component.java:2101)
> at javax.swing.plaf.metal.BumpBuffer.<init>(MetalBumps.java:152)
> at javax.swing.plaf.metal.MetalBumps.createBuffer(MetalBumps.java:65)
> at javax.swing.plaf.metal.MetalBumps.setBumpColors(MetalBumps.java:100)
> at javax.swing.plaf.metal.MetalBumps.<init>(MetalBumps.java:57)
> at javax.swing.plaf.metal.MetalBorders$ToolBarBorder.<init>(MetalBorders.java:281)
> at
>javax.swing.plaf.metal.MetalLookAndFeel.initComponentDefaults(MetalLookAndFeel.java:376)
> at javax.swing.plaf.basic.BasicLookAndFeel.getDefaults(BasicLookAndFeel.java:65)
> at javax.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel.java:714)
> at javax.swing.UIManager.setLookAndFeel(UIManager.java:363)
> at javax.swing.UIManager.setLookAndFeel(UIManager.java:390)
> at SwingTest.main(SwingTest.java:6)
> Exception in thread "main" java.lang.NullPointerException
> at java.util.Hashtable.get(Hashtable.java, Compiled Code)
> at javax.swing.UIDefaults.get(UIDefaults.java, Compiled Code)
> at javax.swing.MultiUIDefaults.get(MultiUIDefaults.java, Compiled Code)
> at javax.swing.UIDefaults.getUIClass(UIDefaults.java:306)
> at javax.swing.UIDefaults.getUI(UIDefaults.java:375)
> at javax.swing.UIManager.getUI(UIManager.java:568)
> at javax.swing.JPanel.updateUI(JPanel.java:110)
> at javax.swing.JPanel.<init>(JPanel.java:70)
> at javax.swing.JPanel.<init>(JPanel.java:100)
> at javax.swing.JRootPane.createGlassPane(JRootPane.java:224)
> at javax.swing.JRootPane.<init>(JRootPane.java:181)
> at javax.swing.JFrame.createRootPane(JFrame.java:154)
> at javax.swing.JFrame.frameInit(JFrame.java:147)
> at javax.swing.JFrame.<init>(JFrame.java:137)
> at SwingTest.main(SwingTest.java:8)
>
>
>
> If you recall, this was the example I posted previously:
>
> ==================== run Stylepad example:
> % java -jar Stylepad.jar
>
> ==================== Stylepad output:
> Exception in thread "main" java.lang.Error: can't load
>javax.swing.plaf.metal.MetalLookAndFeel
> at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:856)
> at javax.swing.UIManager.initialize(UIManager.java:926)
> at javax.swing.UIManager.maybeInitialize(UIManager.java:948)
> at javax.swing.UIManager.getUI(UIManager.java:559)
> at javax.swing.JPanel.updateUI(JPanel.java:110)
> at javax.swing.JPanel.<init>(JPanel.java:70)
> at javax.swing.JPanel.<init>(JPanel.java:100)
> at javax.swing.JRootPane.createGlassPane(JRootPane.java:224)
> at javax.swing.JRootPane.<init>(JRootPane.java:181)
> at javax.swing.JFrame.createRootPane(JFrame.java:154)
> at javax.swing.JFrame.frameInit(JFrame.java:147)
> at javax.swing.JFrame.<init>(JFrame.java:124)
> at Stylepad.main(Stylepad.java:73)
>
>
> ----- Original Message -----
> From: Andre Lewin <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, January 21, 2000 3:35 PM
> Subject: HELP: jdk122rc2 swing stuff doesn't work
>
>
> > Hello Alistair
> > I have the same problem with jdk122rc3.
> > Do you know an solution for this problem ?
> >
> > Thanks
> > Andre
> >
>
>
> ----------------------------------------------------------------------
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
--
[EMAIL PROTECTED] Public Access User -- Not affiliated with Teleport
Public Access UNIX and Internet at (503) 220-1016 (2400-28800, N81)
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]