wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Mixing components with paint() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Mixing components with paint()" Watch "Mixing components with paint()" New topic
Author

Mixing components with paint()

Mark Owens
Greenhorn

Joined: Feb 24, 2000
Posts: 26
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

Joined: Dec 14, 1998
Posts: 20647
    ∞

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!


permaculture Wood Burning Stoves 2.0 - 4-DVD set
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Mixing components with paint()