Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #1432 > unrolled thread
| Started by | "Thomas Ruschak" <thomas.ruschak@THRWHITE.remove-dii-this> |
|---|---|
| First post | 2011-04-27 15:33 +0000 |
| Last post | 2011-04-27 15:33 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.lang.java.gui
Drawing icons on a scroll "Thomas Ruschak" <thomas.ruschak@THRWHITE.remove-dii-this> - 2011-04-27 15:33 +0000
Re: Drawing icons on a sc "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:33 +0000
| From | "Thomas Ruschak" <thomas.ruschak@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:33 +0000 |
| Subject | Drawing icons on a scroll |
| Message-ID | <WBWSh.1453$2v1.297@newssvr14.news.prodigy.net> |
To: comp.lang.java.gui
Ok,
I have a friend who is doing a simple Java Swing project. I don't know
from Java, but I am an experienced programmer in other languages, so I am
trying to help him.
He's got a JScrollPane with an image in it. He wants to be able to put
an icon on the JScrollPane in response to user input. He needs the icon
redrawing to be handled by the JScrollPane, i.e. the JScrollPane should tell
the icon when it needs to redraw itself. He'll also need to be able to
delete the icon, of course. What's the "correct" way to do this in Swing?
Can anyone give me a quick & simple explanation?
Thanks,
Tom
---
* 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
[toc] | [next] | [standalone]
| From | "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:33 +0000 |
| Subject | Re: Drawing icons on a sc |
| Message-ID | <708591c5cd6d4@uwe> |
| In reply to | #1432 |
To: comp.lang.java.gui Thomas Ruschak wrote: > I have a friend who is doing a simple Java Swing project. . > He's got a JScrollPane with an image in it. He wants to be able to put >an icon on the JScrollPane in response to user input. .. Tell 'your friend' that one easy way to achieve this in Java is to put a JPanel with an appropriate layout in the JScrollPane, then add JLabels (containing the images) into the JSP as needed. A call to 'validate()' should have everything appear correctly. -- Andrew Thompson http://www.athompson.info/andrew/ Message posted via JavaKB.com http://www.javakb.com/Uwe/Forums.aspx/java-gui/200704/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
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.gui
csiph-web