Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How come this isn't working anymore?

 
Steven YaegerII
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see any JMenu's? You have to show us the BROKEN stuff, not just the stuff that works.
 
Steven YaegerII
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic