jQuery in Action, 2nd edition*
The moose likes Java in General and the fly likes How come this isn't working anymore? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "How come this isn Watch "How come this isn New topic
Author

How come this isn't working anymore?

Steven YaegerII
Ranch Hand

Joined: May 31, 2000
Posts: 182
The following Chart class defines a chart and also uses the Graphic2D class to draw itself. It works fine when in a frame without any JMenus or JMenuItems. With menu stuff added, when I click on "File" & then click to display the single sub-menu, it freezes on the screen and I get a bunch of runtime errors:
at Chart.paint(Chart.java, Compiled Code)
at javax.swing.JComponent.paintChildren(JComponent.java:452)
at ... JComponent.paint(JComponent.java:641)
at ... JLayeredPane.paint(JLayeredPane.java:547)
... that's the jist of them. How come it's not working now ?
Also, any suggestions on shorter Chart implementations are good.
Thanx,
Steve

please use the [ code ] opening and closing tags (without the spaces) when posting source code.
Thanks for your cooperation.
- satya

[This message has been edited by Madhav Lakkapragada (edited March 30, 2001).]
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
I don't see any JMenu's? You have to show us the BROKEN stuff, not just the stuff that works.


"JavaRanch, where the deer and the Certified play" - David O'Meara
Steven YaegerII
Ranch Hand

Joined: May 31, 2000
Posts: 182
Yes, I should have included the other code also. The problem is with the above public class Chart extends JComponent and the two classes below:
<code>

</code>
 
GeeCON Prague 2014
 
subject: How come this isn't working anymore?