Solved

jscrollpane extra smooth how did they do that?

Posted on 2004-08-09
10
1,065 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
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

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
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 the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will learn how to implement Singleton Design Pattern in Java.

734 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