scrolling

A Java JOptionPane showMessageDialog with scrolling text

Here's the source code for a simple JOptionPane showMessageDialog example, where I use a JTextArea inside of a JScrollPane to show a long text message in the showMessageDialog:

A Java JScrollBar example

I took a little time today to add some new features to my "JustWrite" text editor, and one of the features I'm experimenting with is an animation similar to the current horizontal scrolling area shown at the top of Apple's Mac web page. When you first hit that page the scrolling area is offset a little bit, and then in an animation the scrollbar moves more to the center of the scrolling display area.

A collection of JScrollPane examples and tutorials

Here is a collection of links to our current JScrollPane tutorials and examples:

How to create and use a JScrollPane in a Java Swing application

Summary: A simple Java JScrollPane source code example.

When you're first learning how to use Java Swing components, like a JScrollPane it can be a little hard to figure out how to get started. To that end I am trying to share several complete Java source code examples that demonstrate how to work with components like these.

How to increase the JScrollPane scrolling speed for mousewheel users

Java Swing FAQ: How do I increase the JScrollPane scrolling speed when using the mouse wheel?

Once you put a component (JTextArea, JEditorPane, JTable) into a JScrollPane in a Java Swing application, you'll quickly see that the default scrolling speed when trying to vertically scroll the viewport with the mousewheel is very slow. To make your scroll pane faster, i.e., more like a native Mac or Windows application, you'll want to increase this default mousewheel vertical scrolling speed.

Syndicate content