File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mixing components with paint()

 
Mark Owens
Greenhorn
Posts: 26
  • 0
  • 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: 21181
Firefox Browser IntelliJ IDE Java
  • 0
  • 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!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic