Example usage for javax.swing JFileChooser setBackground

List of usage examples for javax.swing JFileChooser setBackground

Introduction

In this page you can find the example usage for javax.swing JFileChooser setBackground.

Prototype

@BeanProperty(preferred = true, visualUpdate = true, description = "The background color of the component.")
public void setBackground(Color bg) 

Source Link

Document

Sets the background color of this component.

Usage

From source file:graph.plotter.LineGraph.java

/**
 * This method works for choosing file path
            /* ww  w .j  av a  2 s  .  c  o  m*/
    */
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
    // TODO add your handling code here:
    JFileChooser jf = new JFileChooser();
    jf.setBackground(Color.white);
    jf.showOpenDialog(null);
    File file = jf.getSelectedFile();
    String f = file.getAbsolutePath();
    jTextField4.setText(f);
}