Here you can find the source of getWindowFileChooserOKButton(JFileChooser chooser)
public static JButton getWindowFileChooserOKButton(JFileChooser chooser)
//package com.java2s; //License from project: LGPL import java.awt.Container; import javax.swing.JButton; import javax.swing.JFileChooser; public class Main { public static JButton getWindowFileChooserOKButton(JFileChooser chooser) { return (JButton) (((Container) ((Container) ((Container) chooser.getComponent(2)).getComponent(2)) .getComponent(4)).getComponent(1)); }/*from ww w. j a va2 s.com*/ }