File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Mixing components with paint()

Mark Owens

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,
paul wheaton

Joined: Dec 14, 1998
Posts: 20971

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
subject: Mixing components with paint()
It's not a secret anymore!