Skip to content

ComandPromt/Simple-Native-File-Chooser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Native File Chooser

Preview

Custom File Chooser

	try {
	
		UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
	
		DemoJavaFxStage test = new DemoJavaFxStage();
	
		LinkedList<File> lista = new LinkedList<File>();
	
			/* Example 1 
			 *
			 *  lista = test.showOpenFileDialogArrayList(false, "xml");
		         *
			 *  lista = test.showOpenFileDialogLinkedList(false, "xml");
			 * 
			 * Example 2 CustomFilter
			 * 
			 * JFileChooser test1 = new JFileChooser();
			 * 
			 * test1.addChoosableFileFilter(new FileNameExtensionFilter("", "mp4", "gif",
			 * "jpg"));
			 * 
			 * lista = test.customShowOpenFileDialogArrayList(false, test1, "mp4,gif,jpg");
			 * 
			 * lista = test.customShowOpenFileDialogLinkedList(false, test1, "mp4,gif,jpg");
			 * 
			 */
		
		for (int i = 0; i < lista.size(); i++) {
	
			System.out.println(lista.get(i).getAbsolutePath());
	
		}
	
	}
	
	catch (Exception e1) {
	
	}
	

Open Folders

showOpenFileDialogArrayList(true, "");

showOpenFileDialogLinkedList(true, "");

Open All Files

showOpenFileDialogArrayList(false, "all");

showOpenFileDialogLinkedList(false, "all");

Open a type of file

showOpenFileDialogArrayList(false, "pdf");

showOpenFileDialogLinkedList(false, "pdf");

Open Image files (jpg,png,gif,bmp)

showOpenFileDialogArrayList(false, "images");

showOpenFileDialogLinkedList(false, "images");

Open Video files (mp4,avi,mpg,mkv)

showOpenFileDialogArrayList(false, "videos");

showOpenFileDialogLinkedList(false, "videos");

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages