1. How to draw a line link from a selected item of JList to other selected item of JList in JDesktopPane? 2. is JDesktopPane able scroll? if yes , How to write code?
thanks.
----cat
--------------------------------------------------- love you.if you are g
For the scrolling, just add everything to a JPanel, add that to a JScrollPane, and add the scrollpane to your JDesktopPane.
Sounds to me like you're writing some kind of diagramming tool; if you, perhaps you could check out JGraph (www.jgraph.com). I hear it is supposed to be useful for creating that kind of thing.
First,thank you Stuart Gray. now,many JInternalFrame in JDesktopPane,and not other components. I try to add JScrollPane to JDesktopPane, but the JInternalFrame does'n visible in JDesktopPane.
Try calling moveToFront() on one of the JInternalFrames. If that doesn't work, the solution might be to make another JInternalFrame for your scrolling area, and then resize that as appropriate. Not ideal, but it might be the only way.