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

Mixing components with paint()

 
Mark Owens
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey all,
The beginner program that I am working on has both drawn items (fillOval, drawRect, etc.) How can I place buttons near these drawn items?
I have done what I can with layout managers already. I tried to separate the component portions and the drawn portions such that the components were on panels and the drawn portions are on canvases and these are added to a layout manager. But there are certain places where I want to put a button right next to a "knob" that I have drawn...
All help appreciated,
Mark
 
paul wheaton
Trailboss
Pie
Posts: 21736
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would try the null layout manager. This is where you pass a null in when a layout manager is asked for. The downside is that you need to call setBounds() for every component - but! you do get exact placement!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic