Forums Register Login

query not work properly every time!

+Pie Number of slices to send: Send
I create java program with database mysql, connectivity hibernate.
By Java program i handle 90 or 900 or 9000 small Jpanel within Big Jpanel, handle means drag & drop. I save co-ordinates in db table.
I faced many test conditions & solved as many as possible with the help of this forum.
Now i got 3 different ways to do this kind of program.
Scenario:-
Now In this topic,
when in swing program in mousereleased event i call

where setlocation1 is another function which used for send co-ordinates to function which check overlap or not with the help of sql query or set panel at calculated location(this i learn from one my old post in coderanch).

where checkoverlap function written for call getoverlap fucntion to call sql query, & set flag.


I write SQL query to check overlap of 2 rectangles with the help of Rectangle's 4 co-ordinate.

now when i run program with 90 or 900 or 9000 panels, no problem for set all panels at calculated position at first time, in db also panels all co-ordinates save properly.
but when i try to drag panel & mouse released at overlap position on another panel, my above group of functions work fine & set dragged panel its original position means
it avoid overlap, but i do this for 10 times 20 times then it give trouble. overlap_flag should true whenever panel overlap. but it not get true due to something not work properly.
I write print statement which give me result list size, when overlap occurs it give no>0, but i can see in program overlap done but in console i see print statement give 0 means no overlap.
How all above functions work correctly for few times & for few times work wrongly & again work correctly?
Please somebody help me.
Let nothing stop you! Not even this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 904 times.
Similar Threads
problem with JDialog
Overloaded Constructor Methods
drawRect() issues
Use of the "This" keyword, and "Point" objects.
Writing Mouse Events
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 15, 2024 22:52:57.