Re: [Java-gnome-developer] Problems with FileChooserWidget
Brought to you by:
afcowie
From: Joao V. <jvi...@ya...> - 2005-06-04 20:44:42
|
--- Igor Foox <if...@re...> escreveu: > Hi everyone, > > I'm a fairly new user to java-gnome, so please bear with me. Hi Igor, welcome! > > I seem to have some trouble with the FileChooserWidget. I first tried to > use it in a semi-complex window, and got the following error (and no > widget): Hmm, just so i get it right: do you want to just show a filechooser, or do you want to embbed it in another window? To just show it, this is the code i used in an app: ---- FileChooserDialog dialog = new FileChooserDialog("Select a picture", this, FileChooserAction.ACTION_OPEN); dialog.addButton("gtk-cancel", 0); dialog.addButton("gtk-ok", 1); dialog.setCurrentFolder(System.getProperty("user.home")); int result = dialog.run(); if (result == 1) { //.... } ---- Now, if you want to embbed it, i haven't tried doing it yet (will try), but take a look at GDVB, it seems to have a nice customized FileChooser, from what can be seen in this screenshot: http://news.nopcode.org/gdvb02.png Cheers, J.V. ____________________________________________________ Yahoo! Mail, cada vez melhor: agora com 1GB de espaço grátis! http://mail.yahoo.com.br |