Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with Combining Graphics and JSliders  RSS feed

 
Sven Habermann
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to draw a diagram in which graphic an JSliders are integrated, in order to select a special y-value to an x-value.
Bit this does not work. The JSliders appear everywhere I click and they aren't there they should be.
I think the problem is the combined usage of the methode paint() from Graphics and JComponents.
But I don't know how to manage it!
PLEASE help me oder tell me a possibility I could manage it on another way!
THANKS!!
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It sounds like a problem with the way you have overridden the paint() or paintComponent() methods... make sure that you call super.paint(g) or super.paintComponent(g) as the first line of any overridden paint() or paintComponent() method. Also, you'll need to post some of the relevant code to get specific help...
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!