Import file to GUI! Need help!!!

Hi everyone,
I have a question regarding to "importing file". I will appreciate any help!
I want to use text file in my program. What I need is "file path" to the file in computer so that i can read this text file to filter the necessary information to build
objects that i need after that. The file path should be navigated through the file system by user.
What i need is something like JFileChooser. But JFileChooser is too simple. It is very difficult to have extreme makeover.
Is there anyway to just get input that is "file path" to text file without using JFileChoose. What I want is file path only and the user can navigate the file. Simple GUI is enough.
Thank you very much!
Edited by: atemu on May 3, 2009 4:43 AM

The [JFileChooser tutorial|http://java.sun.com/docs/books/tutorial/uiswing/components/filechooser.html] includes a working example of using your own icons for specific types of files. It ammounts to extending FileView and setting it on the JFileChooser via
JFileChooser#setFileView(...);So that's what I did. And for the icons, I return the appropriate icon according to the installed FileSystemView.
import javax.swing.filechooser.*;
import javax.swing.JFileChooser;
import javax.swing.Icon;
import java.io.File;
public class Tester {
    public static void main(String[] args) {
        final JFileChooser chooser = new JFileChooser();
        chooser.setFileView(new FileView() {
            FileSystemView systemView = chooser.getFileSystemView();
            @Override
            public Icon getIcon(File f) {
                return systemView.getSystemIcon(f);
        chooser.showOpenDialog(null);
        System.exit(0);
}

Similar Messages

  • Currently use acrobat 6.  getting box that states: can't find adobe pdf resource files... need help

    Getting a box that states: can't find
    adobe pdf resource files... need help!!!

    I get a similar error, but only under the following conditions:  I must be printing to the Adobe PDF printer and printing multiple pages, one at a time, and then it only happens on the second and subsequent print attempts.  That is to say, the first page prints just fine and this just started yesterday afternoon. The specific file referenced in the error does not exist, but why would it work the first time and not the second?  Since it only started yesterday, I tried uninstalling and reinstalling this morning, but it made no difference.  I don't see anything under print properties like job-options and it is a single user, unshared printer.  Thoughts?  I understand the same thing is happening in at least one other of our locations, but no one there has looked into it yet.  This is a BIG problem for me, however, and I need to find an answer quickly.

  • [SOLVED]pacnew files? i need help...

    Hi,
    After upgrade with pacman -Syu, a lot of pacnew files in /etc.I read about this in archwiki but i'm still confused :S I have no idea how to use vimdiff or meld ...
    Can someone explain me simple what to do with pacnew files.I'm new in arch linux and i need help.
    Thanks to everyone. (sorry for my english)
    Last edited by grobar87 (2011-04-15 14:26:42)

    ewaller wrote:
    a pacnew file is used when an update to a package requires a new configuration file, but there is already a configuration on your system which would be wrong to simply overwrite.
    If there is nothing in the old, corresponding file you want to keep, it is okay for you to move the pacnew file and overwrite the old configuration.  If it is not okay, you need to incorporate your customizations into the pacnew file, and then move the pacnew file and overrwrite the old file.
    The tools you mentioned are just that -- tools to help figure out what changed.  The easiest solution is just to run diff fileName fileName.pacnew to see the lines that changed.
    Thanks for reply...I install vim and run diff:
    [root@DejanArch dejan]# diff /etc/group /etc/group.pacnew
    8c8
    < lp:x:7:daemon,dejan
    > lp:x:7:daemon
    11c11
    < wheel:x:10:root,dejan
    > wheel:x:10:root
    15a16
    > utmp:x:20:
    20,28c21,29
    < games:x:50:dejan
    < network:x:90:dejan
    < video:x:91:dejan
    < audio:x:92:dejan
    < optical:x:93:dejan,hal
    < floppy:x:94:hal
    < storage:x:95:dejan,hal
    < scanner:x:96:dejan
    < power:x:98:dejan
    > games:x:50:
    > network:x:90:
    > video:x:91:
    > audio:x:92:
    > optical:x:93:
    > floppy:x:94:
    > storage:x:95:
    > scanner:x:96:
    > power:x:98:
    31,39d31
    < dbus:x:81:
    < hal:x:82:
    < avahi:x:84:
    < usbmux:x:140:
    < camera:x:97:dejan
    < ntp:x:1000:
    < rtkit:x:133:
    < deluge:x:125:
    < utmp:x:20:
    Now? How to merge this two files?
    Thanks again.
    Last edited by grobar87 (2011-04-13 18:57:50)

  • Unauthorized files...need help please

    When i downloaded the new version of iTunes, i plugged in my ipod and all of a sudden i have 280 file that i cant copy onto my computer because i am not authorized to play them on my computer. I need help on figuring out how to make them accessable and able to put on my ipod. Please help

    Thanks for the tip, but that wasn't it.
    If you have any other suggestions, please let me know... I can't figure this out for the life of me. I can't drag any icon or file. But the mouse does work for clicking... (ie. files can be opened).

  • Files..files...files...need help!!!

    ey there..we have this project in java wherein we're going to use Files or we have to do file handling..we are supposed to be able to add to a file, view a certain file, delete a file and edit a file..the edit thing is the one that's giving me a lot of problems..i would just like to ask if there is a way wherein one can access a File and then edit the contents of it and then write it again having the same File name or in other words overwriting the file so that the edited one will be the one saved...i really need help with this..i've been thinking of solutions about this for weeks already...tnx...:)

    Read the file into memory.
    Edit the data in memory.
    Write the memory out to a new file with the same name.

  • Adobe turned all of my files into pdf, need help.

    I downloaded adobe 9.5 this morning and it turned all of my files and shortcuts into pdf files. I can't open anything without taking a 5 min mission through my computer. Need help please.

    You may find this helpful:
    http://helpx.adobe.com/acrobat/kb/application-file-icons-change-acroba t.html

  • Importing a Burned CD need help!

    This has to be the worst problem i have encountered.
    A friend of mine burned a cd for me.
    It was burned as a data cd (if that helps at all)
    As i put the cd into my computer it has a new security setting where i cant listen to those songs that he bought off itunes and put on the cd. i need his password.
    To make it worse those certain songs wont even play in a cd player.
    Even with some songs that i can listen to. The import option DOES NOT pop up.

    It will still have to be authorized under the account that purchased it. Even though it was considered to be a gift & you had not intent, it's still illegal file sharing. The terms of purchase, as I said before, state that your purchase is for PERSONAL USE only. This doesn't include giving or "gifting" copies to all your friends. When you buy a CD or purchase a download, you purchase a license to use that music within stated limits, you do not own the music to do with whatever you like.
    This is not a good idea to post this kind of information in a public forum. Apple now can choose to go after your friend & you for the violation. I would suggest you drop your efforts to do this, & purchase the music yourself.

  • Can't download an xml file to desktop - Need help

    Hello, I need to save an xml file to my desktop. Each time I try, the xml file saves as a Final Cut Pro icon. When I try to open or upload the xml file - Final Cut automatically opens (which I don't want) and it is unable to show/translate the xml. How can I get my imac to download and upload xml properly?
    I need to do this so that I can use the bulk mail "Dazzle" function on Endicia for online postage. Help please and thanks so much.

    Sean Moor wrote:
    Okay, for Endicia to open the xml file it has to be in a format such as my_file.xml but when I try to put it onto my desktop, the .xml file defaults to a Text Edit file for example my_file.xml.txt
    Just highlight the file, hit the "return" key, and you can edit the file's name. Just highlight ".txt" and delete it. You'll should get a prompt asking you if you really want to change the extension to "xml" from "txt". Just click on the "Use xml" button. That should change the extension.
    You can also edit the extension in the "Get Info" inspector in the Finder. Just highlight your file and use the "command"-"i" key combo or choose "Get Info" from the Finder's File menu.
    You shouldn't need Office to work with XML files. They're just text files. In fact, a great app for working with XML files is free: TextWrangler is really good for editing XML files...
    charlie

  • Itunes stops working as soon as it reads first track while importing CD (APPCRASH). Need help!

    Itunes stopped working error comes up as soon as it reads first track while importing CD and needs to close program (APPCRASH). I have uninstalled and reinstalled iTunes several times - also ran CD diagnostics in iTunes and looks OK. I'm on Vista Home Premium Edition. If it will help I saved the CD Diagnostics from ITunes and the Windows APPCRASH info. I've spend several hours trying to figure this out. Any ideas?

    Problem solved! I had my pc plugged into a port replicator to use a bigger screen, etc. When I unplugged it and tried to import the CDs it worked fine. Not sure why I got the error but whenever I get unexpected errors in the future, I will take it off the replicator to eliminate that possibility. Thanks to all who reviewed.

  • Flat file to RFC need help

    Hello , i have a flat file scenario : XML to RFC and response back to xml , in which case i have a more complex scenario.
    Instead of calling RFC multiple times i need to call RFC multiple times through a BPM loop through one xml with duplicated strcutures how is it possible please help me
    Krishna

    Hi ,
    Just More info-
    Actually if you do the occurence as 0-n then you will be having structure like this-
    <Messages>
         <Message1>
              <Source>
                   <Header> </Header> (1..1)
                   <Line> </Line> (1..1)
              </Source>
              <Source>
                   <Header> </Header> (1..1)
                   <Line> </Line> (1..1)
              </Source>
         </Message1>
         <Message1>
                   <Source>
                        <Header> </Header> (1..1)
                        <Line> </Line> (1..1)
                   </Source>
                   <Source>
                        <Header> </Header> (1..1)
                        <Line> </Line> (1..1)
                   </Source>
         </Message1>
    </Messages>     
    In this case you have multiple Message1 under Messages node. So now it is N number of messages under one tag.
    For your scenario, you can try like this-
    1) No need of changing any occurence anywhere.
    2) Use BPM -mentioned in my earlier reply
    I think it will work without 1:N or N:1 mapping Because in your case there is no multiple messages, but you have multiple occurences of each set. So I think you can easily handle with parForEach loop.
    For eg. on ParForEach -
    http://help.sap.com/saphelp_nw2004s/helpdata/en/27/db283fd0ca8443e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/27/db283fd0ca8443e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/27/db283fd0ca8443e10000000a114084/frameset.htm
    Also check in BPM Patterns for ParForEach.
    Regards,
    Moorthy
    Just check it

  • Emailing Garageband files...need help.

    Is there a thread discussing emailing  Garageband files? I'm able to do it by compressing the files, but the size of them varies wildly.
    I'm trying to send to bandmates so they can work on them to.
    Thanks for any help!

    cgjr wrote:
    Is there a thread discussing emailing  Garageband files?
    pretty much every thread about emailing is because people can't figure out how to do so, they dont' realize they need to Compress the project file.
    cgjr wrote:
    the size of them varies wildly.
    the size depends on what's been recorded in the project. MIDI instruments will take up almost no space. Audio will take up about 10MB/minute/track, and audio does not compress very well

  • File upload - I need help

    [Sorry 'bout my bad English]
    I'm trying to upload a file in a JSP. This page do a post to another JSP. In this page I have the code (there is more):
    1)PrintWriter pw = new PrintWriter(
    2) new BufferedWriter(new FileWriter( file)));
    3) ServletInputStream in = request.getInputStream();
    4) int i = in.read(); // here I got the error
    5) while ( i != -1 ) {
    6) pw.print((char) i);
    7) i = in.read();
    8) }
    I got an error that the file was not open, so I run the page in the debug mode, and I notice that the lenght of 'in', just after line 3, is 0.
    Please help
    thank you.

    read this. its 4 pages. tells ya everything you need to know.
    http://www.onjava.com/pub/a/onjava/2001/04/05/upload.html?page=1
    -S-

  • Imported files have error - please help

    I recently Imported 3 CD's however one of the CD files cause iTunes to display "An error occurred." whenever they are acted upon via mouse functions. I.e. single/double clicking them, trying to move them to playlists, etc. There is no number attached to the error and this is the full text:
    An error occured
    The Music Store could not process your request, please try again later.
    The CD is: Grammy 2006 Nominees
    The other files for the other 2 CD's act normally. I have tried deleting the files and re-importing them 2x now. I have tried running diagnostics on the CD with no errors showing on the diagnositcs. FYI here is the printout.
    Microsoft Windows XP Home Edition Service Pack 2 (Build 2600)
    Dell Inc. Dimension XPS
    iTunes 6.0.2.23
    CD Driver 2.0.4.3
    CD Driver DLL 2.0.3.2
    LowerFilters: Cdr4_xp (7.1.0.188), PxHelp20 (2.0.0.0), drvmcdb (1.0.0.1), sscdbhk5 (1.0.0.1),
    UpperFilters: Cdralw2k (7.1.0.188), GEARAspiWDM (2.0.4.3),
    Video Driver: NVIDIA GeForce 6800 \GeForce 6800
    IDE\DiskST3160023AS____________________________8.12___, Bus Type ATA, Bus Address [0,0]
    IDE\CdRomSAMSUNGCD-R/RW_SW-252S_________________R902___, Bus Type ATA, Bus Address [0,0]
    IDE\CdRomNEC_DVD+-RW_ND-3450A___________________103C___, Bus Type ATA, Bus Address [1,0]
    If you have multiple drives on the same IDE or SCSI bus, these drives may interfere with each other.
    Some computers need an update to the ATA or IDE bus driver, or Intel chipset. If iTunes has problems recognizing CDs or hanging or crashing while importing or burning CDs, check the support site for the manufacturer of your computer or motherboard.
    Current user is administrator.
    D: SAMSUNG CD-R/RW SW-252S, Rev R902
    Data or MP3 CD in drive.
    Found 1 songs on CD, playing time 74:32 on CDROM media.
    Track 1, start time 00:02:00
    Get drive speed succeeded.
    The drive CDR speeds are: 4 8 10 12 16 40 48.
    The drive CDRW speeds are: 4.
    E: _NEC DVD+-RW ND-3450A, Rev 103C
    Audio CD in drive.
    Found 21 songs on CD, playing time 79:55 on Audio CD.
    Track 1, start time 00:02:00
    Track 2, start time 03:30:61
    Track 3, start time 07:51:72
    Track 4, start time 11:15:38
    Track 5, start time 14:21:65
    Track 6, start time 18:34:74
    Track 7, start time 22:17:23
    Track 8, start time 27:08:52
    Track 9, start time 31:42:37
    Track 10, start time 34:42:62
    Track 11, start time 37:56:21
    Track 12, start time 41:42:30
    Track 13, start time 45:37:58
    Track 14, start time 48:46:34
    Track 15, start time 53:00:24
    Track 16, start time 57:22:23
    Track 17, start time 61:38:44
    Track 18, start time 65:36:23
    Track 19, start time 69:36:36
    Track 20, start time 72:56:31
    Track 21, start time 76:23:28
    Audio CD reading succeeded.
    Get drive speed succeeded.
    The drive CDR speeds are: 8 16 24 32 40 48.
    The drive CDRW speeds are: 8.
    The drive DVDR speeds are: 8.
    The drive DVDRW speeds are: 8.

    Thanks for responding.
    Yes, I copied the whole project folder at once with all its subfolders. but I left the original location completely untouched. so why would that matter anyway.
    everything else in the project appears to be completely in tact.
    note: when I open up the song with the missing audio files, I notice that the record path is not assigned, which is perplexing as i did not touch this perameter. It is supposed to reflect the path of the project right? (all my other songs do this)
    just now I tried recording a test audio track to see where the file goes when this parameter is left untouched and it automatically directed itself to the project folder. so I'm bafffled still.
    I can't understand how files could disappear without my doing something. It seems if they are still in existence then my computer would have had to change the date that they were created. and perhaps the extensions of the file names fromm .aif to something else (yes, I double checked that parameter too; it records to .aif). There must a computer malfunction. I can't have this happen again(who can?). this is the worst type of recording accident and if it can't be explained then my whole Logic recording career feels at risk.

  • Bundle Import in CC&B - need help

    Hi,
    I am trying to create Bundle import to import the configurations of BO, ZONE, Portal zone etc,.
    When I click on save, I am getting an Java.lang.ClassNotFoundExeception : CIPTUSEF and looks like this is coming base.
    I am doing this on the upgraded environment.
    Is there any specific settings that I need to do? Appreciate any help on this.
    Thanks
    Veena
    Edited by: Veena S on Aug 1, 2011 1:44 AM

    I think the issue is the FK Reference ci_user. When you look at the FK Reference you will see that the program name is CIPTUSEF but the program type is set to java. Change this to COBOL. The Bundle import screen should display correctly now.

  • Import App Error..need help

    I have a perfectly working app that will no longer import to its production app_id. I get this error on both 1.6 (db version 9) and from the oracle site:
    ORA-20001: GET_BLOCK Error. ORA-20001: Execution of the statement was unsuccessful. ORA-06550: line 83, column 21: PLS-00103: Encountered the symbol &quot;&#21071;&#17732;&#21330;&#21087;&#20549;&#21071;&#24404;&#22868;&#17744;&#24403;&#17747;Q&quot; when expecting one of the following: ( - + case mod new not null &lt;an identifier&gt; &lt;a double-quoted delimited-identifier&gt; &lt;a bind variable&gt; avg count current exists max min prior sql stddev sum variance execute forall merge time timestamp interval date
    Error installing application
    I have 2 export files available. The one titled f133 4-26 will still import but is missing many changes. I will send both to [email protected] I have a feeling that the error is coming from page 6, because the line 83 mentioned in the error is the length of the report region on page 6. And no others reach that line. Please help.
    Dawn

    Dawn - You should not presume that your problem has not begun to consume the time and energy of others until at least 3 days have passed without a response. In this case it hasn't even been 5 hours. For all matters that are urgent and have anything to do with production applications you should, without exception, contact Oracle Support and begin to use those resources.
    What I found (having worked on this for the past 2 hours) is that a tabular form on page 18 has some garbage in it. See line 12909 in the file you sent:
    begin
    wwv_flow_api.create_report_columns (
      p_id=> 44729805831502084 + wwv_flow_api.g_id_offset,
      p_region_id=> 44729521381502068 + wwv_flow_api.g_id_offset,
      p_flow_id=> wwv_flow.g_flow_id,
      p_query_column_id=> 2,
      p_form_element_id=> null,
      p_column_alias=> 'ID',
      p_column_display_sequence=> 2,
      p_column_heading=> 'Id',
      p_column_alignment=> 'LEFT',
      p_default_sort_column_sequence=> 0,
      p_disable_sort_column=> 'Y',
      p_sum_column=> 'N',
      p_hidden_column=> 'Y',
      p_display_as=> 'HIDDEN',
      p_column_width=> '16',
      p_pk_col_source_type=> 'S',
      p_pk_col_source=> '剏䕄卒剟偅剏彔奔䕐当䕓Q           ',
      p_ref_schema=> 'NSREPORT',
      p_ref_table_name=> 'ORDER_REPORT_TYPES',
      p_ref_column_name=> 'ID',
      p_column_comment               => '');
    end;If you remove that whole block (from begin to end) the file will install. However, I recommend that you use the Builder to try to fix whatever might be wrong with that particular report column, then export the file again and try to import/install it.
    Scott

Maybe you are looking for

  • Is there a way to make the bookmarks in Safari icons as opposed to text?

    Was just wondering if there was a way to replace the text on the bookmarks bar with just an icon representing the page, as I would like to fit more bookmarks on and prefer the look overall

  • BUSINESS PROCESS FOR TYRE INDUSTRIES

    WHAT IS THE BUSINESS PROCESS FOR TYRE INDUSTRIES....    PLZ ANSWER ME ASAP......

  • 11g OBIEE install, Administrator details

    I am trying to install 11g OBIEE on a Windows 7-64-bit machine. When it gets to the "Administrator details" no matter what password I type(including numbers, special chars), it puts red "X" against Administrator details and doesn't let me go further.

  • How do I stop automatic iOS download?

    I have an iPhone 5 in the UK and I really don't want the new "flat" UI that comes with iOS7. For some reason, I noticed that my iPhone has started downloading it already, even though I definitely haven't initiated it. Is there some way to prevent thi

  • Caculate internal table value

    Dear all, I have a requirement to caculate the value of an internal table.Detial requirement is as below. Internal table 1: PRUEFLOS   NO      MATNR      INT     IT     145IN     ITM      19IN     IN     08IN 30000181266 1     19800     OK     NOT