Solved

jscrollpane extra smooth how did they do that?

Posted on 2004-08-09
10
1,056 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
hibernate example using maven 12 105
ejb wildfly example 2 104
printf performancy 11 98
maximize the sum of fractions 33 70
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

738 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