scroll

The Linux more command

The Linux more command lets you view text files or other output in a scrollable manner. It displays the text one screenful at a time, and lets you scroll backwards and forwards through the text, and even lets you search the text.

Looking at a Linux file with the more command

A common way to use the Linux more command is to display the contents of a text file. Where you might normally "cat out" the contents of a text file with the cat command, like this:

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.

JList JScrollPane - a JList scrollbar/scroll example

Continuing my exploration of the Java JList, here's some sample JList/JScrollPane code, showing how I add a JList to a JScrollPane.

To get started, somewhere at the top of my class I declare my JList and JScrollPane, like this:

private JList menuList;
private JScrollPane menuScrollPane;

Later in my Java class I then set up my JList, like this:

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.

Apple Mighty Mouse clicks but won’t track

Mac Mighty Mouse FAQ: Help, my Apple wireless Mighty Mouse clicks but won't track properly; what's going on?

I’ve had a lot of problems with batteries with my Apple Bluetooth (wireless) Mighty Mouse, including this “tracking” problem, but fortunately everything just came to a happy conclusion.