Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mysterious Java application crash




On Apr 10, 2007, at 2:27 AM, Florian Bruckner (3Kraft) wrote:

It would seem to be something non-trivial and still probably something gc timing related or thread related, consistent with your intermittent results. Adding the following simple test seems to work all right for me.
Changed the logging to println's and made the ClassLoader simply a URLClassLoader.


   public static void main(String[] args) {

   		Label l = new Label("TEST");
   		final Window test = new Window(new Frame("Test"));
   		test.setMinimumSize(new Dimension(300,300));
   		test.add(l);
   		test.pack();
  		test.addMouseListener(new java.awt.event.MouseAdapter() {
			public void mousePressed(java.awt.event.MouseEvent evt) {
				if (bkgnd == Color.blue)
					bkgnd = Color.green;
				else bkgnd = Color.blue;
				test.setBackground(bkgnd);
				test.repaint();
			}
		});
   		test.setVisible(true);
   		removeDropShadowBorder(test);

   		// Test Swing
   		JLabel jl = new JLabel("JTEST");
   		final JWindow jtest = new JWindow(new Frame("JTEST"));
   		jtest.setMinimumSize(new Dimension(300,300));
   		jtest.getContentPane().add(jl);
   		jtest.pack();
  		jtest.addMouseListener(new java.awt.event.MouseAdapter() {
			public void mousePressed(java.awt.event.MouseEvent evt) {
				if (bkgnd == Color.blue)
					bkgnd = Color.green;
				else bkgnd = Color.blue;
				jtest.setBackground(bkgnd);
				jtest.repaint();
			}
		});
   		jtest.setVisible(true);
   		jtest.setLocation(200,200);
   		removeDropShadowBorder(jtest);   		
   }




Mike Hall mikehall at spacestar dot net http://www.spacestar.net/users/mikehall http://sourceforge.net/projects/macnative



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: mysterious Java application crash (From: Greg Guerin <email@hidden>)
 >Re: mysterious Java application crash (From: "Florian Bruckner (3Kraft)" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.