Hello Lee,

  although it's not a 2D question, I'll try to answer. The exception
  indeed happens on 1.3. It doesn't occur on our next release which is
  still under development.

  It might be related to bug
   4337825 getControlDarkShadow throws NullPointerException when printing.
  (at least, it have the same stack trace there)

  Anyway, it's not a good idea to add a swing component into a
  heavyweight container - that's a recipe for lots of layout and other
  problems.

  One way to avoid the exception would to be using JApplet instead of
  Applet:
public class Test1 extends JApplet
{
  public Test1()
  {
  }

  public void init()
  {
    getContentPane().add( new JButton("my button") );
  }

  public void start()
.....

  Thank you,
    Dmitri


On Mon, Dec 18, 2000 at 09:50:0p -0500, J. Lee Dixon wrote:
 > I posted this message earlier and got no response.  Should I post this
 > as a bug?  I'd rather wait until somebody else verifies my problem.
 >
 > My applet is simple.  I have a JButton in an applet.  When this applet
 > is run with the AppletViewer, it displays fine.  If the applet window is
 > resized by the user, a NullPointerException occurs.
 >
 > Exception occurred during event dispatching:
 > java.lang.NullPointerException
 >         at
 > javax.swing.plaf.metal.MetalLookAndFeel.getControlDarkShadow(MetalLookAn
 > dFeel.java:1076)
 >         at
 > javax.swing.plaf.metal.MetalUtils.drawFlush3DBorder(MetalUtils.java:35)
 >         at
 > javax.swing.plaf.metal.MetalUtils.drawButtonBorder(MetalUtils.java:106)
 >         at
 > javax.swing.plaf.metal.MetalBorders$ButtonBorder.paintBorder(MetalBorder
 > s.java:70)
 >         at
 > javax.swing.border.CompoundBorder.paintBorder(CompoundBorder.java:95)
 >         at javax.swing.JComponent.paintBorder(JComponent.java:574)
 >         at
 > javax.swing.AbstractButton.paintBorder(AbstractButton.java:1095)
 >         at javax.swing.JComponent.paint(JComponent.java:740)
 >         at
 > javax.swing.JComponent._paintImmediately(JComponent.java:4344)
 >         at javax.swing.JComponent.paintImmediately(JComponent.java:4187)
 >         at
 > javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:370)
 >         at
 > javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEve
 > ntQueueUtilities.java:205)
 >         at
 > java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:154)
 >         at java.awt.EventQueue.dispatchEvent(EventQueue.java:317)
 >         at
 > java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:103)
 >         at
 > java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
 >         at java.awt.EventDispatchThread.run(EventDispatchThread.java:84)
 >
 > I am running JDK 1.3
 >  <<Test1.html>>  <<Test1.java>>  <<Test1.class>>
 >
 > J. Lee Dixon
 > SAIC - Celebration, FL
 > 407-566-1438
 > [EMAIL PROTECTED]    AOL: LeeOrlando
 >

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to