I'm trying to create a text editor, so I've created a JTextArea that expands into a JScrollPane.
I'm running Windows 10 and java version "1.6.0_38"
I am fairly new to javax.swing (I've only learned AWT so far), the trackpad seems to work when I tried going back to the older java.awt.TextArea.
public class CustomFrame extends JFrame {
public CustomFrame() {
this.setBackground(new Color(255, 255, 255));
this.setEditor();
this.pack();
}
private void setEditor() {
this.setTitle("Text Editor");
JTextArea text = new JTextArea("");
JScrollPane sp = new JScrollPane(text, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
this.getContentPane().add(sp);
this.setVisible(true);
}
}
In the javax.swing.JScrollPane the trackpad isn't detected by the app, and scrolls the Command Line window in the background instead.