Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scrollbar in JFileChooser gives error

When I use JFileChooser, the first time I use its scrollbar, I get two or four copies of the following error message:

2016-01-08 18:37:17.706 java[14158:2289154] inOptions: {
    JavaCUIThumbStartKey = 0;
    "is.flipped" = 0;
    kCUIOrientationKey = kCUIOrientVertical;
    kCUIThumbProportionKey = "0.497863233089447";
    max = 0;
    pressedpart = 0;
    state = normal;
    value = 0;
    widget = scrollbar;

Here is sample code that has this behavior:

package tests;
import java.awt.event.*;
import javax.swing.*;

public class SwingTest extends JFrame {

    public SwingTest() {
        JButton button = new JButton("Choose files");
        add(button);
        button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                chooseFile();
            }
        });
    }

    private void chooseFile() {
        JFileChooser chooser = new JFileChooser();
        chooser.showOpenDialog(this);
    }

    public static void main(String[] args) {
        SwingTest test = new SwingTest();
        test.pack();
        test.setVisible(true);
    }
}

My Swing programs continue to run (mostly), but this bothers me. What is causing this, and how can I avoid it?

Mac OS X 10.11.2 El Capitan
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
Eclipse IDE for Java Developers, Luna Service Release 2 (4.4.2)

like image 720
David Matuszek Avatar asked Nov 09 '22 22:11

David Matuszek


1 Answers

It's a Closed (Not reproductible) Java bug:

  • https://bugs.openjdk.java.net/browse/JDK-8152662

It was closed because no test case was provided, not because it is not a bug.

like image 89
UBIK LOAD PACK Avatar answered Nov 15 '22 12:11

UBIK LOAD PACK