Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

overlapping components  RSS feed

 
kate damond
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a bean containing a JTabbed Pane and some JButtons. Because of the way they are positioned, only the top half of the buttons can be pressed ... it's as if they are 'underneath' the JTabbed pane. Can I make them come to the front ?
Kate
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kate,
I don't exactly know what you did. If you have a JTabbedPane and a JPanel containing buttons on another Panel then you need to specify some layout for the underlying Panel. That would stop the overlapping situation that you are encountering. If you don't want to do that then you need to specify the location of the button panel (or every button) and the tabbed pane so that they don't overlap (because you have a null layout).
Regards,
Manfred.
 
kate damond
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, thanks for the reply ..
I use a null layout manager for development.
It's not a question of how do I position the components so they don't overlap, I can easily reposition compnents. What I want to do is make best use of the screen real-estate, by putting buttons in the area of wasted space at the top of the JTabbedPane (because my four tabs don't fully occupy their rectangle) So, I wanted to know if I can control the behaviour of components on overlap.
Kate
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kate,
IMO, I don't think you can ... last one drawn wins.
Regards,
Manfred.
 
kate damond
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah - ok thanks,
just to be cheesy I'll try redrawing them in the opposite order !!
Cheers,
Kate
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!