Solved

jscrollpane extra smooth how did they do that?

Posted on 2004-08-09
10
1,033 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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
 
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

777 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