I need JApplet to view open files of computer

i am developing a code which display open file of my computerand that can load selected filewhen load button is clicked.
But my can't do that please help me.my email is [email protected]
here is my code
import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
import java.io.*;
import javax.imageio.*;
public class SimpleMenus extends JApplet {
private JButton enterButton, openButton;
private ActionListener al = new ActionListener() {
public void actionPerformed(ActionEvent e)
openFile();
private JMenu[] menus = {
new JMenu("File"), new JMenu("Edit")
private JMenuItem[] items = {
new JMenuItem("open"),
new JMenuItem("load"),
new JMenuItem("cancel")
public void init() {
for(int i = 0; i < items.length; i++) {
items.addActionListener(al);
menus[i%3].add(items[i]);
JMenuBar mb = new JMenuBar();
for(int i = 0; i < menus.length; i++)
mb.add(menus[i]);
setJMenuBar(mb);
Container cp = getContentPane();
cp.setLayout(new FlowLayout());
private void openFile ()
// display file dialog, so user can choose file to open
JFileChooser fileChooser = new JFileChooser();
fileChooser.setFileSelectionMode(
JFileChooser.FILES_ONLY );
int result = fileChooser.showSaveDialog( this );
// if user clicked Cancel button on dialog, return
if ( result == JFileChooser.CANCEL_OPTION )
return;
// get selected file
File fileName = fileChooser.getSelectedFile();
// display error if invalid
if ( fileName == null ||fileName.getName().equals( "" ) )
JOptionPane.showMessageDialog( this, "Invalid File Name", "Invalid File Name",JOptionPane.ERROR_MESSAGE );
else {
// open file
try {
ObjectOutputStream output = new ObjectOutputStream(new FileOutputStream( fileName ) );
openButton.setEnabled( false );
enterButton.setEnabled( true );
// process exceptions from opening file
catch ( IOException ioException ) {
JOptionPane.showMessageDialog( this,"Error Opening File", "Error",JOptionPane.ERROR_MESSAGE );
}//end of main class

My trial version has expired and it taking up a lot of space on my computer. It wont let me uninstall the program. working on windows OS. I dont know what you mean by Adobe AICS5.1 folder?

Similar Messages

  • Can't view open files in Photoshop CS5 on Mac

    I can open files and see that they are open in the layers panel, but there is no window that opens to actually view or edit the open file. Assistance is greatly appreciated in getting this resolved!

    TUrn pff GPU aceleration in the Performance prefs.
    Common Photoshop Issues | Mylenium's Error Code Database
    Mylenium

  • How can I view open files?

    I am trying to view currently open files as I can do in Windows 7 by hovering over the task bar items. How do I see a list of currently open files on the mac without closing or minimizing the window I am using?

    Not having windows, I am not sure what you are after, exactly.
    What OS are you using?
    To pretty much see all open files...
    In Snow Leopard you can use Expose.
    Mac 101: Exposé
    In Lion you can use Mission Control.
    http://www.apple.com/macosx/whats-new/mission-control.html
    In either, if you want to see what files are open only for a given application, you can click and hold on the appropriate dock icon.
    charlie

  • New user needs help with quickly opening files

    I have a new imac that I purchased 8/2010. Is there a way to open a file or attachment without the download window opening up to enable you to view the file? Is there a setting that would allow me to just click the file attachment (email) like an excel document and it just opens immediately. Im getting a little aggrevated going through all the steps to open and close an attached email file. this is my first mac, so I am learning. Thanks

    Is there a "Quick Look" button at the top of the message?
    Right-click the attachment and choose "Quick Look".

  • Need help fast about opening file

    hello i have this 2 classes to open file and display it .the open method works fine but when ever i try to open different file it adds the new data and display both . the problem is it not suppose to add the new data to the old list it should only show the new data only ...can any one help thx
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class RoomGUI extends JFrame
       private RoomSortedList list;
         // Menu items:
       private JMenuItem mOpen;
       private JMenuItem mSaveAs;
       private JMenuItem mExit;
         // Displayed regions of the window:
         private JTextField messageField;
         private JTextArea textArea;
          * Constructor for RoomGUI object to set up
          * GUI window with menu.
         public RoomGUI()
              list=new RoomSortedList();     
         // Components to display on window:
              messageField = new JTextField();
              messageField.setEditable(false);
              textArea = new JTextArea();
              textArea.setEditable(false); 
                        // Arrnge components on window:
              Container contentPane = getContentPane();
              contentPane.add(messageField, BorderLayout.SOUTH);
              JPanel centerPanel = new JPanel();
              contentPane.add(centerPanel, BorderLayout.CENTER);
              centerPanel.setLayout(new GridLayout(1,1));
              centerPanel.add(new JScrollPane(textArea));
    //  Create menu items for the "File" menu:
          mOpen = new JMenuItem ("Open");
          mSaveAs = new JMenuItem ("SaveAs");
          mExit = new JMenuItem ("Exit");
          //  Create "File" menu:
          JMenu fileMenu = new JMenu ("File", /*tearoff =*/ false);
          fileMenu.add(mOpen);
          fileMenu.add(mSaveAs);
          fileMenu.add(mExit);
          // Create menu bar:
          JMenuBar mainMenuBar = new JMenuBar();
          mainMenuBar.add(fileMenu);
          // Put menu bar on this window:
          setJMenuBar(mainMenuBar);
         mOpen.addActionListener( new FileOpener(textArea,list) );
         mSaveAs.addActionListener( new FileSaver(list) );
          mExit.addActionListener(new Quitter());
              // Routine necessities with JFrame windows:
              setSize(500, 400);
              setLocation(200, 100);
              setTitle("Project 4");
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              setVisible(true);
         } // constructorfile opener
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class FileOpener implements ActionListener
         private RoomSortedList list;
         private JTextArea textArea=new JTextArea();
              private int returnvalue;
              private String filename;
              private JTextField messageField;
         public FileOpener(JTextArea ta,RoomSortedList ls)
              this.textArea=ta;
              this.list=ls;
         public void actionPerformed(ActionEvent e)
              list =new RoomSortedList();
              messageField = new JTextField();
              JFileChooser filechooser = new JFileChooser();
             // if a file is selected returnvalue = 0
             // else if cancel button is pressed
             // returnvalue = 1
             returnvalue = filechooser.showOpenDialog(null);
             //if open is selected then return filename
             if (returnvalue == filechooser.APPROVE_OPTION){
                filename = filechooser.getSelectedFile().toString();
                // now read the rooms from the file with the name filename
                // invoke the readfile method
                readFile(filename);
                messageField.setText(filename);
             }//if
             // if cancel is selected then close the filechooser
             else if (returnvalue == filechooser.CANCEL_OPTION)
                filechooser.cancelSelection();
       * Reads room data from a text file.Check if each lines are in valid room
       * format, and values. Catches exception errors for any invalid lines or
       * values thrown by ParseRoom or Room constructors.
       * Valid lines are appended to an sorted linked list. 
       * @param filename     name of file containing
       private void readFile(String filename)
           JFrame errorD=new JFrame();
          String str=null;
          Room r=null;
          int linenum=0;
          TextFileInput Obj=null;
          try
             Obj = new TextFileInput(filename);
          catch (RuntimeException rte)
             System.out.println(rte.getMessage());
          while (true)
             str = Obj.readLine();
             linenum++;
             if (str==null) break; // to stop reading lines at the end of file
             try
                r = RoomTextFormat.parseRoom(str);
             catch (RoomTextFormatException rtf)
                JOptionPane.showMessageDialog(errorD, "Error reading line # " +
                   linenum + ": " + str + "\n" + rtf.getMessage() + "\n"+
                   "This line of text has been excluded from the list.",
                   "Text Format Error", JOptionPane.ERROR_MESSAGE);
                continue;
             catch (IllegalRoomException ire)
                JOptionPane.showMessageDialog(errorD, "Error reading line # " +
                   linenum + ": " + str + "\n" + ire.getMessage() + "\n" +
                   "This line of text has been excluded from the list.",
                   "Room Instantiation Error", JOptionPane.ERROR_MESSAGE);
                continue;
             list.insert (r);
             textArea.setText("");
                RoomListIterator MyIterator = list.beginIterating();
                int c=1;
                while (MyIterator.hasNext())
                   Room m = MyIterator.next();
                   textArea.append(c + ": " + m + "\n");
                   c++;
                }//while
          }// while (true)
       } // readFile()
    }

    i apologize again.thx anyway . heres the code
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class RoomGUI extends JFrame
         private RoomSortedList list;
         // Menu items:
         private JMenuItem mOpen;\
         // Displayed regions of the window:
         private JTextField messageField;
         private JTextArea textArea;
          * Constructor for RoomGUI object to set up
          * GUI window with menu.
         public RoomGUI()
              list=new RoomSortedList();     
              // Components to display on window:
              messageField = new JTextField();
              messageField.setEditable(false);
              textArea = new JTextArea();
              textArea.setEditable(false); 
              // Arrnge components on window:
              Container contentPane = getContentPane();
              contentPane.add(messageField, BorderLayout.SOUTH);
              JPanel centerPanel = new JPanel();
              contentPane.add(centerPanel, BorderLayout.CENTER);
              centerPanel.setLayout(new GridLayout(1,1));
              centerPanel.add(new JScrollPane(textArea));
                  //Create menu items for the "File" menu:
              mOpen = new JMenuItem ("Open");
              //  Create "File" menu:
              JMenu fileMenu = new JMenu ("File", /*tearoff =*/ false);
              fileMenu.add(mOpen);
              // Create menu bar:
              JMenuBar mainMenuBar = new JMenuBar();
              mainMenuBar.add(fileMenu);
              // Put menu bar on this window:
              setJMenuBar(mainMenuBar);
              mOpen.addActionListener( new FileOpener(textArea,list) );
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              setVisible(true);
         } // constructor
    } // class RoomGUIopen file
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class FileOpener implements ActionListener
         private RoomSortedList list;
         private JTextArea textArea=new JTextArea();
              private int returnvalue;
              private String filename;
              private JTextField messageField;
         public FileOpener(JTextArea ta,RoomSortedList ls)
              this.textArea=ta;
              this.list=ls;
         public void actionPerformed(ActionEvent e)
              list =new RoomSortedList();
              messageField = new JTextField();
              JFileChooser filechooser = new JFileChooser();
             // if a file is selected returnvalue = 0
             // else if cancel button is pressed
             // returnvalue = 1
             returnvalue = filechooser.showOpenDialog(null);
             //if open is selected then return filename
             if (returnvalue == filechooser.APPROVE_OPTION){
                filename = filechooser.getSelectedFile().toString();
                readFile(filename);
                messageField.setText(filename);
             }//if
             // if cancel is selected then close the filechooser
             else if (returnvalue == filechooser.CANCEL_OPTION)
                filechooser.cancelSelection();
       private void readFile(String filename)
          String str=null;
          TextFileInput Obj=null;
             Obj = new TextFileInput(filename);
          while (true)
             str = Obj.readLine(); // 
             if (str==null) break; // to stop reading lines at the end of file
             list.insert (str);
             textArea.setText("");
                RoomListIterator MyIterator = list.beginIterating();
                int c=1;
                while (MyIterator.hasNext())
                   Room m = MyIterator.next();
                   textArea.append(c + ": " + m + "\n");
                   c++;
                }//while
          }// while (true)
       } // readFile()
    }

  • Need Codec to view video files

    I have a hand full of short video clips (less than 10 min. each) but cannot play them using any software (including Quicktime) because I get the error stating I am missing the correct codec. Getting the info on the files shows that I am needing the "PowerVideo Pro, Integer" Codecs. Does anyone have any idea how I could get this? I can still open the files and hear the audio but no video will show, just a black space where the video should be.
    Thanks.

    What type of videos are you trying to view? Can you post the URL or link to the videos?
    Make sure you have the latest versions of the following installed on your computer:
    RealPlayer
    Flip4Mac
    VLC Media Player
    Perian (AVI and FLV support)
    Adobe Flash Player Software
    !http://i50.tinypic.com/izvwo1.gif!

  • Viewing & Opening Files in CS5

    This is a trivial Photoshop issue but it's been bugging me.
    I use CS5 on WindowsXP. My CS5 has been updated.
    When I am in CS5 and I go to open a file, the user interface window opens, and the folders and contents are shown in "List" mode.
    However, say I click on "My Documents" and then "My Pictures" all of the folders change to "Thumbnail" mode. But the thing is, I don't want it to change. I want to stay in "List" mode. So then I have to change the viewing mode from "Thumbnails" back to "List".
    And once I've changed it, it doesn't stay that way. If I continue working in CS5 and open another file in "My Documents>My Pictures" it reverts to "Thumbnails" mode again even though I already changed it to "List" mode.
    This must be an Adobe issue as opposed to a Windows issue. In XP I have my Folder Options already set so that how I view one set of folders determines how every set of folders is viewed.
    I've looked through CS5 Preferences and this "File viewing" isn't listed so it doesn't seem as though it can be changed within CS5.
    Does anyone have any suggestions on how to set the File Viewing Mode in CS5 to "List" and keeping it there?

    I believe it really is a Windows XP issue.  The File - Open et. al. dialogs are part of Windows Explorer, and as I recall XP does not remember your preferences individually in those dialogs.
    I believe you're seeing a difference between your "general" folders and My Pictures because of the folder type.  You may be able to influence it into using List view for all by right-clicking on the folder, choosing Properties, then Folder Type (this is all from memory; I'll boot up an XP VM in a little while and check).
    Beyond trying the above, you might want to consider upgrading to a more modern operating system to overcome this issue.  Work was done even back in Vista to improve the standard dialog usability, including remembering your preferences.  Interestingly, Windows 7 got a little better (it doesn't seem to "forget" them any more), though Windows Explorer in general has been made if anything less configurable.
    The funny thing is that people more often want to change the XP dialog default from List view to something else (e.g., to Thumbnails or Details).
    -Noel

  • Logic 6.4.3 Crashed - NEED HELP - Can't Open File!!!!!!

    My Logic crashed after saving a song. When I saved my track, Logic crashed and a box appeared saying ("The application logic pro quit unexpectedly"). The backups won't open and the same error box appears, other songs project and logic open just fine. If anyone has any updates or suggest please post!
    Best,
    Chit Chat

    Same thing is happening to me. Just realized it and am going to stop using Mail for the timbering I guess.
    Also have an Exchange account.

  • In pages I have the new logo and when I try to open a document it says I need an update to open.  My computer says pages has been updated.  Any suggestions?

    I am unable to open certain documents in Pages.  A number of documents in Pages have the new logo and when I try to open it, I am prompted to update, yet my computer says Pages update is installed.  Not sure how to get around this?  Thanks

    You are not on OSX 10.7.4, you are on OSX 10.9.
    You have 2 versions of Pages on your Mac.
    The newer Pages 5 in your Applications folder which can open the older Pages '09 but frequently alters/damages the file.
    The older Pages '09 in your Applications/iWork folder which can not open the newer Pages 5 files.
    You appear to be alternately opening one or the other.
    Apple has removed over 90 features from Pages 5.
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
    Best is to archive/trash Pages 5, after exporting its files back to Pages '09 versions, then rate/review it in the App Store, and get back to work.
    Peter

  • Hyperlinks in Acrobat try to open files on computer as web documents

    I have been sent a large number of pdf files that were converted from Word. They have hyperlinks in them that should open other files on my computer, however, Acrobat 9 on my computer shows them as weblinks (with the W on the cursor when hovered over the hyperlink) and tries to open them with a web browser. The file address in the hyperlink is correct, as if I copy and paste it into a Word document the link opens the file on my computer. An example of one of the links is:
    file:///C|/Users/Rob/Documents/Business/AGA/AGA%20-%20for%20Client/AGA%20Support%20-%20Dig ital/008%20HSE%20Performance.xls
    Can anyone help with a way of converting these links in Acrobat so they work properly? If not, can you suggest how they may have incorrectly turned from Work hyperlinks into Acrobat weblinks, so I can ask the person who sent them to me to convert them again without the problem recurring.
    Many thanks in advance.
    Rob

    "file://", like "http://" or "mailto://" is a URI/URL scheme. For a discussion of "schemes" visit W3C and associated RFCs.
    As such, Adobe Reader/Acrobat knows to inform the OS which knows to hand off execution of the URL to the installed browser.
    n.b., the link in PDF meerly reflects what was put in the authoring file by the content author - no "transformers" action by Acrobat.
    To fix - create a link that is not a URL; establish a UNC link or relative file link:
    --| manually edit the PDF link(s) with Acrobat
    --| revisit the orignal authoring file and correct the used link in Word's hypertext dialog.
    Be well...

  • Trying to use document 2 but can't open file on computer!

    I put a .rta document from my iPad into Dropbox. Now I can't open it on my Mac, but the message says the file can't be read. Does anyone know how to do this?

    I don't believe you put the correct file in dropbox.

  • If you have a computer with iTunes and you want to sync do you need your iTunes library opened on the computer?

    For ios 5 I noticed that if I wanted to iTunes sync I had to have the the library opened and running on my computer plus it takes a long time to find my iPod. Do I need to have the iTunes library up in running on my computer to wifi sync or is there something wrong wIth my iPod or computer. I run on a pc

    I, too, hoped that you could buy a film for less having rented it from iTunes. Like a "try-before-you-buy".
    Do it Apple - I'd buy more movies!

  • Permissions needed to view and close open files

    Hi all,
    We have a 2012 R2 file server, and we would like to give Helpdesk permissions to view open files on that file server, and close them if necessary if someone complains that it is locked.
    What is the minimum permissions needed to accomplish this as we do not want to give them Administrator group access.
    Thanks

    Hi,
    You can give Helpdesk only read permissions to view, open and close files on the file server. 
    For more detailed information, please see:
    NTFS Permissions, Part 2
    https://technet.microsoft.com/en-us/magazine/2006.01.howitworksntfs.aspx
    Best Regards,
    Mandy
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • Viewing/disconnecting open file connections on Lion Server?

    Has anyone found a way to view open file connections on Lion Server? With 10.6 Server Admin, you can view/disconnect open connections by protocol.  I haven't been able to locate a way to do this in the new Server app or new version of Server Admin.

    Hi kevinfromhunt,
    Try sudo launchctl unload /System/Library/LaunchDaemons/com.apple.AppleFileServer.plist
    sudo serveradmin start afp
    Suppose it would work with other services as well.
    It worked for FileSharing for me.
    It appears that 10.7 Lion doesn't unload properly and as it fails loading it cause it's already loaded it fails.
    Good luck.
    Beno

  • View EPS files with CS3

    I have Adobe Illustraotor CS3, I only need it to view artwork files sent to me, I do not need to work on them, how can I view EPS files that were created in newer versions of Adobe

    "Place" is Adobe's lingo for what other software simply calls "Import".
    Not exactly.
    It would be interesting to read Adobe's official criteria (if it exists) for whether a particular format belongs in "Open" or "Place." But generically:
    "Import" is more restrictive, in that it implies that an import filter is going to translate the incoming data into native objects. "Place" is a (rather awkward) throwback term to early page-layout programs (ex.: PageMaker), which were essentially intended to be "assembly" programs in which to assemble and arrange many multiple kinds of external files (text, raster, vector) into a page design. The implication of "Place" is that the receiving program does not necessarily have to "disassemble" or "break into" or even "understand" the content of the incoming file; it can just position and scale a reference to it on the page (i.e.; link).
    The "Place" concept is particularly germane to positioning EPS files in page-layout apps. The operative word in EPS is "Encapsulated." It provides for a "capsule" that can contain a collection of objects that can be passed to/through many programs that don't necessarily understand its content.
    (Remember, prior to its acquisition of Aldus, Adobe didn't even have a page-layout application.)
    So "Import" is what Illustrator does (if it can) if you don't specify linking to the external file. You don't have to Open an EPS in Illustrator; you can link to it as an external file (i.e.; "Place" it on the page.)
    To my mind, "Open" should be reserved for native files that were created in the program, "Import" should be reserved for non-native files that will be translated into native content, and "Place" (or "Insert") should be used for linking to external files. So Illustrator should not "Open" an EPS, since it may not have been created in Illustrator, and therefore may contain objects which will be translated with varying degrees of  fidelity; it should either "Import" it (translate it) or "Place" it (leave its content alone). By the same token, Illustrator should not claim to "Open" a JPEG, either.
    But remember, Illustrator was essentially a visual PostScript editor.
    Also it no doubt would arguably be more confusing to newcomers to provide an Open, Import, and Place command. (So why not make the terms more explicit and intuitive in the first place, perhaps like: Reopen, Translate, Link?)
    And it's also no doubt considered more "impressive" from a marketing standpoint to claim that a program can "Open" various other-brand native files, and that's where my cynical mind suspects the runaway overlap stems from. So Illustrator can ostensibly "Open" certain version Corel Draw files, and vice-versa. (No, they can Import data from each other, to varying degrees of fidelity.) Adobe, of course, is not the only offender here. For example, FileMaker claims to "Open" Excel spreadsheets, too, when it really just imports the data.
    At any rate, despite frequent claims to the contrary, EPS is not obsolete in the world at large beyond Adobe apps; not until non-Adobe apps can insert (place) and/or import (translate) PDF as a spot graphic. Microsoft Word (Windows), for example, can't do that. So EPS is still needed there for those who understand its purpose and limitations. Similarly, some softwares which drive cutters / plotters import EPS files with vector content, too; but don't claim to "open" native Illustrator files.
    JET

Maybe you are looking for