Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #2756
| From | "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: Problem with overlapp |
| Message-ID | <7b336f1df125e@uwe> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <1195039808.678376.267540@o80g2000hse.googlegroups.com> |
| Date | 2011-04-27 15:40 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui Chanchal wrote: >Hi, Hi. That was almost an excellent SSCCE you posted, but if you make some trivial changes, it is possible to post just a single (.java) file that helps people see it easier. The way you would do that is (the same way I just did to see the code run as Test.java) - Move all the imports to the 'top' - demote the 'public class Line' to 'class Line' - ..that's about it, actually. The thing is - it is easier for you to do that before posting, than for two other people to do it while before seeing the problem. >When the program is run, two lines are drawn. First one, Orange in >color and has a green border. Sencond line is a blue one with red >border. the borders are opverlapping. > >My issue is that when i move mouse pointer over the part of the blue >line which is overlapping with the green border, the events are not >getting fired. I am not entirely sure I understand. But I will take a shot. If you mean that 'the bottom component' is not getting events when the mouse passes over the 'top component' then I think that makes sense. The top component is 'consuming' the events before they reach the bottom component. >Kindly advice on how to overcome this problem I am not sure that you are following the correct strategy here. If I were the user about to drag either of those components, I would expect the 'top one' to be dragged whenever the pointer is within its bounds. Why would I want the bottom one to get the events? If need be, I might even drag the top one out of the way for the moment, just to get at the bottom one. I suggest instead that you draw an 'animated outline' of the bounds of the 'selected' line - then I think it would be fairly intuitive for the user. Also, a way to 'reorder' the layering might be handy. What is this all for, by the way? I can think of a number of interesting types of things you might do with this, but what is this one used for? -- Andrew Thompson http://www.athompson.info/andrew/ Message posted via JavaKB.com http://www.javakb.com/Uwe/Forums.aspx/java-gui/200711/1 --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
Back to comp.lang.java.gui | Previous | Next — Next in thread | Find similar | Unroll thread
Re: Problem with overlapp "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
Re: Problem with overlapp "L I M" <l.i.m@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
Re: Problem with overlapp "A. Bolmarcich" <a..bolmarcich@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
csiph-web