Solved

jscrollpane extra smooth how did they do that?

Posted on 2004-08-09
10
1,008 Views
Last Modified: 2012-06-21
How did these guys get their JScrollpane to be so smooth?  Did they use a JList?  Is that a custom drawing?  Any sample code that could do something similar?

http://www.chat-avenue.com/adultchat.html

Thanks.

kes.
0
Comment
Question by:kesea
  • 5
  • 2
  • 2
  • +1
10 Comments
 
LVL 92

Expert Comment

by:objects
ID: 11759591
You can control the viewport position.
What problems are you having getting smooth scrolling.
0
 
LVL 92

Expert Comment

by:objects
ID: 11759602
i believe thats an AWT applet, but you should be able to achieve the same using Swing.
0
 
LVL 15

Expert Comment

by:Javatm
ID: 11759625
Hi Friend;

Here is how you use viewport w/ scrollpane :
http://java.sun.com/docs/books/tutorial/uiswing/components/scrollpane.html

Hope that helps . . .
Javatm
0
 
LVL 35

Expert Comment

by:girionis
ID: 11759969
Check the applet, it should be somewhere in your browser's cache. Then decompile it and you have the source code. A decompiler: http://aolca.com.com/3000-2417-10046809.html (hope it is not obfuscated).
0
 

Author Comment

by:kesea
ID: 11767628
Well a little more info for you.  I am trying to implement the same thing, but what I have done is put a JEditPane in HTML mode in a scroll bar.  Then I add more and more to this JEditPane.  The problem is I am having trouble controlling the scrolling nicely and I am getting a flickering.  

How do you think that website that I gave you does it?  Is that a Scrollable JEditpane with HTML?  JList?  

Is there a way to control the JScrollPane so that it doesn't automatically update the screen and then add the new info to a JEditPane and then scroll it?  Plus I am having a heck of a time with the autoscrolling if you want to zip back up to look at messages while adding new information, it keeps scrolling to the bottom and then it jumps back to where I am dragging the cursor.  Thanks experts.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 15

Expert Comment

by:Javatm
ID: 11768028
> Is there a way to control the JScrollPane so that it doesn't automatically update the screen and then add the new info to a JEditPane and then scroll it?

Use viewport as you add more text or components to it.
0
 
LVL 92

Expert Comment

by:objects
ID: 11768044
> The problem is I am having trouble controlling the scrolling nicely and I am getting a flickering

Didn't we determine the flickering was caused by the editor pane, and not actually related to the scroll pane?

> Is that a Scrollable JEditpane with HTML?  JList?  

Pretty sure, its AWT.
0
 

Author Comment

by:kesea
ID: 11769089
Yes we did determine the flickering was the JEditorPane.  Objects do you know if it is possible to add an HTML object to a JList?  That would probably solve my problem.  Thanks.
0
 
LVL 92

Accepted Solution

by:
objects earned 500 total points
ID: 11769114
> Objects do you know if it is possible to add an HTML object to a JList?  

yes you should be able to add html to a JList.
0
 
LVL 92

Expert Comment

by:objects
ID: 11770045
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
java continue statement 10 72
countHi2 challenge 7 44
Eclipse Neon and jdk 1.8.0 11 65
What is the latest versions eclipse neon 2 117
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now