From: SourceForge.net <no...@so...> - 2006-11-17 16:34:01
|
Bugs item #1598463, was opened at 2006-11-17 11:33 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=438935&aid=1598463&group_id=44253 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: UI: MacOS X-specific Group: 4: Serious Status: Open Resolution: None Priority: 5 Private: No Submitted By: bwbecker (bwbecker) Assigned to: Nobody/Anonymous (nobody) Summary: Adding subclass of JSlider causes exception Initial Comment: Users of my library reported an exception when it displayed a window. I reduced it down to the following code, which produces the exception that follows the code. This was on a friend's PowerBook running Tiger and Java 1.5. She has DrJava version 20060918-1737. Thanks! Byron Here's the code: import javax.swing.*; public class TestUI { public static void main(String[] args) { JPanel p = new JPanel(); p.add(new SpeedSlider()); JFrame f = new JFrame("TestUI"); f.setContentPane(p); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.setSize(100, 100); f.setVisible(true); } } class SpeedSlider extends JSlider { public SpeedSlider() { super(JSlider.VERTICAL, 0, 100, 20); } } Here's the exception generated: UIDefaults.getUI() failed: createUI() failed for SpeedSlider[,0,0,0x0,invalid,alignmentX=0.0,alignmentY=0.0,border=,flags=0,maximumSize=,minimumSize=,preferredSize=,isInverted=false,majorTickSpacing=0,minorTickSpacing=0,orientation=VERTICAL,paintLabels=false,paintTicks=false,paintTrack=true,snapToTicks=false,snapToValue=true] java.lang.reflect.InvocationTargetException java.lang.Error at javax.swing.UIDefaults.getUIError(UIDefaults.java:691) at javax.swing.MultiUIDefaults.getUIError(MultiUIDefaults.java:117) at javax.swing.UIDefaults.getUI(UIDefaults.java:737) at javax.swing.UIManager.getUI(UIManager.java:868) at javax.swing.JSlider.updateUI(JSlider.java:244) at javax.swing.JSlider.<init>(JSlider.java:194) at SpeedSlider.<init>(TestUI.java:24) at TestUI.main(TestUI.java:9) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at koala.dynamicjava.interpreter.EvaluationVisitor.visit(EvaluationVisitor.java:1105) at edu.rice.cs.drjava.model.repl.EvaluationVisitorExtension.visit(EvaluationVisitorExtension.java:254) at koala.dynamicjava.tree.StaticMethodCall.acceptVisitor(StaticMethodCall.java:109) at edu.rice.cs.drjava.model.repl.DynamicJavaAdapter$InterpreterExtension.interpret(DynamicJavaAdapter.java:429) at edu.rice.cs.drjava.model.repl.DynamicJavaAdapter.interpret(DynamicJavaAdapter.java:93) at edu.rice.cs.drjava.model.repl.newjvm.InterpreterJVM$4.run(InterpreterJVM.java:249) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=438935&aid=1598463&group_id=44253 |