Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #2839
| From | "Larry A Barowski" <larry.a.barowski@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: Draggable JButton and |
| Message-ID | <wNSdneWCEMXWh83anZ2dnUVZ_jydnZ2d@comcast.com> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <dea1b5f2-9d39-4455-a4ed-f91a9853e8dd@a39g2000pre.googlegroups.co |
| Date | 2011-04-27 15:41 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui "Chanchal" <chanchal.jacob@gmail.com> wrote in message news:dea1b5f2-9d39-4455-a4ed-f91a9853e8dd@a39g2000pre.googlegroups.com... > Hello All, > > The following code adds a JButton to a JPanel in a JScollPane, when a > JButton is clicked. A MouseMotionAdapted is regitered to the added > JButton to make it draggable. The problem i'm facing is that the > scrollbars of the JSrollPane is not getting activated when the added > button is dragged outside the viewable area. The result i want is > that, if the added JButton is dragged out side the viewable area, is > should be posible to bring it back to the viewable area by scrolling > the scollbars. Kindly advice how can i create this result. The documentation for JComponent.setAutoscrolls() explains what to do. --- * 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 | Find similar | Unroll thread
Re: Draggable JButton and "Larry A Barowski" <larry.a.barowski@THRWHITE.remove-dii-this> - 2011-04-27 15:41 +0000
csiph-web