aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes can you resolve these questions?Thanks. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "can you resolve these questions?Thanks." Watch "can you resolve these questions?Thanks." New topic
Author

can you resolve these questions?Thanks.

cat cater
Ranch Hand

Joined: Jun 06, 2005
Posts: 39
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
cat cater
Ranch Hand

Joined: Jun 06, 2005
Posts: 39
like PowerBuild's DataWindow
Stuart Gray
Ranch Hand

Joined: Apr 21, 2005
Posts: 410
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.
cat cater
Ranch Hand

Joined: Jun 06, 2005
Posts: 39
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.
Stuart Gray
Ranch Hand

Joined: Apr 21, 2005
Posts: 410
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.
cat cater
Ranch Hand

Joined: Jun 06, 2005
Posts: 39
oh,I made a mistake . I should add JDesktopPane to JScrollPane,and resize JDesktopPane's size.

----code----
JDesktopPane.setPreferredSize(new Dimension(0,2000));
JDesktopPane.validate();
------------------------------------------------------
well,but it doesnot autoscroll. somebody tell me use "implements Scrollable".
find help.

!@_@!


-----cat
Stuart Gray
Ranch Hand

Joined: Apr 21, 2005
Posts: 410
Really? I'm a bit surprised by that, but glad it works
cat cater
Ranch Hand

Joined: Jun 06, 2005
Posts: 39
1. How to draw a line link from a selected item of JList to other selected item of JList in JDesktopPane?
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: can you resolve these questions?Thanks.
 
Similar Threads
FocusListener
JList enter key advice needed
programmatic change of text item color in JLIst
JList, clicking empty space selects last item
problem selecting JList item