Hi,
I have been working on a ScrollPane and I need to increase the increments (when you press the up and down arrow), and also make it respond to a mouse scroll wheel.
The code I have (one screen in a CardLayout) is:
public void instructions ()
{
resize (800, 680);
instructions = new Panel ();
JLabel title = new JLabel (createImageIcon ("images//instructionstitle.jpg"));
JTextArea objective = new JTextArea ("Objective:");
ScrollPane scrollPane = new ScrollPane ();
//scrollPane = new ScrollPane (ScrollPane.SCROLLBARS_AS_NEEDED);
scrollPane.setSize (new Dimension (800, 670));
scrollPane.add (title);
instructions.add (scrollPane);
screens.add ("2", instructions);
}
I am thinking I need to use one of the mouse event handlers, and maybe create additional methods?
Thank you.