Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to prevent the overlapping of two JInternalframs on an JDesktop frame .  RSS feed

 
vishnu vardhan reddy
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys can anyone help me in solving the below problem using netbeans

When i increase the size of one JInternalframe its getting overlapped onto the next JInternalframe.How I can I prevent the overlapping also when i increase the size of one JInternal frame the other JInternal frame's has to be reduced automatically.
 
Rob Spoor
Sheriff
Posts: 21092
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at java.awt.ComponentListener, with this you can catch the resize event of the one and then resize the other.

Keep in mind that if you add the resize listener to all internal frames, you could get an infinite loop - the resizing of the first causes the resizing the second, which might cause the resizing of the third, etc.

Although I'm pretty sure that after a while there should be no overlap so it should stop.
 
vishnu vardhan reddy
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey thanks Rob
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!