XML Feeds

.

[java-dev] Open Dialog is worthless

topher lafata topher at topher.com
Thu Feb 28 01:59:18 MST 2008


i seem to remember java.awt.Dialog being better  behaved than JDialog  
within max.
t

On Feb 26, 2008, at 19:37 PM, Matthew Aidekman wrote:

>
> The included code for bringing up a file chooser appears to crash  
> max unless housed in a ...
>
> new Runnable(){but my stuff here}
>
> ...type of deally.  Unfortunately it seems that if you house it in  
> a runnable, anything it reads (that is the point of a file chooser)  
> can't be shared with the rest of the program since it's on a  
> different thread.
>
> Has anyone else successfully read a file selected by a filechooser  
> into their mxj?
>
>
>
>
>
> 		String initialPath = ".";
> 		String selectedPathname = null;
> 		JFileChooser openDialog = new JFileChooser();
> 		openDialog.setSelectedFile( new File(initialPath) );
> 		int openResult = openDialog.showOpenDialog(null);
> 		
> 		if(openResult == JFileChooser.APPROVE_OPTION)
> 		{
> 			selectedPathname = openDialog.getSelectedFile().getPath();
> 			System.out.println(selectedPathname);
> 		}
> _______________________________________________
> java-dev mailing list
> java-dev at cycling74.com
> http://www.cycling74.com/mailman/listinfo/java-dev



More information about the java-dev mailing list