Solved

jscrollpane extra smooth how did they do that?

Posted on 2004-08-09
10
1,045 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
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
print map entry 34 72
use lov values 2 63
eclipse console opening separately 2 29
add projects t working set in maven 2 23
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
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…
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:
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

829 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