JScrollPane Problem

D

Dipak

Hi
i am developing one application and I am using Swing Classes in which
i have Jsplitpane object on left pane there tree control on right pane
i am using JScrollPane in that i am adding my own class which is
derived from JApplet.That whole applet is not displayed only some part
that fit into the Jsplitpane rightcomponent but when i scroll that
pane that Applet is not scrolled properly.That Applet goes out of that
JScrollPane



Please Help


Regards
Dipak
 
A

Andrew Thompson

i am developing one application

Generally Java developers *only* use the term
application for code that is *not* applets..
so it is probably best to call it an applet
if that is what you mean..
..and I am using Swing Classes in which
i have Jsplitpane object on left pane there tree control on right pane
i am using JScrollPane in that i am adding my own class which is
derived from JApplet.

With a 'Swing' and all those 'J' classes, I'd
guess you'd be best asking a different group..
..That whole applet is not displayed

Where? URL?
...only some part
that fit into the Jsplitpane rightcomponent but when i scroll that
pane that Applet is not scrolled properly.That Applet goes out of that
JScrollPane

....errr. Please help.. ??

I sugget..
1) URL
2) SSCCE <http://www.physci.org/codes/sscce.jsp>

BTW ..is that an Applet or a JApplet?
 
C

Cid

Hi
i am developing one application and I am using Swing Classes in which
i have Jsplitpane object on left pane there tree control on right pane
i am using JScrollPane in that i am adding my own class which is
derived from JApplet.That whole applet is not displayed only some part
that fit into the Jsplitpane rightcomponent but when i scroll that
pane that Applet is not scrolled properly.That Applet goes out of that
JScrollPane

I may be off-base here but I always assumed it would be Naughty to
nest top level containers (JFrame, JApplet, JDialog) inside one
another. I would expect strange behavior from such an animal.

I think the more conventional method is to put your gui stuff in a
panel (ie: derive from JPanel instead of JApplet). Then you could
attach your panel to an appropriate container (JApplet or JFrame) as
needed.
 
A

Andrew Thompson

I may be off-base here but I always assumed it would be Naughty to
nest top level containers (JFrame, JApplet, JDialog) inside one
another. I would expect strange behavior from such an animal.

No, that is completely doable.. wait, I have
rendered applets in applications, *launched*
applications *from* applets, but not tried to
*render* an application (JFrame/Window) inside
the *bounds* of an applet. That would be an
interesting if ..perhaps pointless (shrugs)
exercise.
I think the more conventional method is to put your gui stuff in a
panel (ie: derive from JPanel instead of JApplet). Then you could
attach your panel to an appropriate container (JApplet or JFrame) as
needed.

Now your talking.. if only I could convince more
developers to put their GUI's in JPanels (though
sometimes I go further up the tree and use Container)
then all this nonsense of fudging an applet into
an application etc. would become unnecessary.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top