I face problem that's when i put JFrame on extended state i.e. Its width & height same as system resolution then some times, it exceed the visible area on different monitor...
You could check the size of the JFrame is not greater than the screen size, which you can get from
and if it is then set the frame size to the screen size.
I solve it by use JFrame height & width less than 10.
How does that work, or have I not understood the problem?
but when i drag small JPanels to the boundary, it go beyond visible region.
Are you saying you want to stop any part of a JPanel from being dragged outside of the JFrame?
BTW why aren't you using JDesktopPane which is designed to handle internal windows which can be dragged around etc.